diff --git a/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js b/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js
index 79ecd5756..3cd9fc4da 100644
--- a/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js
+++ b/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js
@@ -1,2 +1,2 @@
-document.addEventListener("DOMContentLoaded",(function(){let e,t,n,o,i,a=!1,r=!0,s=!1;const l=["address","article","aside","blockquote","details","dialog","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","ol","p","pre","section","table","ul"].join(", ");function c(){if(t){const i=t;e.saveItemWithPresave(i,(()=>{o=$("#summernote").summernote("code"),i.clientData=n,i.content.text=o,i.content.preview_plain=function(e,t=90){return e.length<=t?e:e.substring(0,t)+"..."}(function(e){const t=document.implementation.createHTMLDocument("New").body;return t.innerHTML=e,t.textContent||t.innerText||""}(o)),i.content.preview_html=null}))}}function u(){return e.getComponentDataValueForKey("notes")||{}}$("#summernote").summernote({height:500,minHeight:null,maxHeight:null,focus:!0,tabDisable:!0,showDomainOnlyForAutolink:!1,toolbar:[["para",["style"]],["style",["bold","italic","underline","strikethrough","clear"]],["fontsize",["fontsize","fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["height",["height"]],["insert",["table","link","hr","picture","video"]],["misc",["codeview","help"]]],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Monospace","Roboto","system-ui","Tahoma","Times New Roman","Verdana"],callbacks:{onInit:function(){},onImageUpload:function(){alert("Until we can encrypt image files, uploads are not currently supported. We recommend using the Image button in the toolbar and copying an image URL instead.")}}}),$("#summernote").on("summernote.change",(function(){document.querySelectorAll(l).forEach((e=>e.setAttribute("dir","auto"))),a||c()})),$("textarea.note-codable").on("input",(()=>{c()})),e=new ComponentRelay({initialPermissions:[{name:"stream-context-item"}],targetWindow:window,onReady:()=>{const t=e.platform;t&&document.body.classList.add(t)}}),e.streamContextItem((l=>{!function(l){if(l.uuid!==i&&(o=null,r=!0,i=l.uuid),t=l,l.isMetadataUpdate)return;n=l.clientData;let c=l.content.text;if($(".note-editable").attr("spellcheck",JSON.stringify(l.content.spellcheck)),c==o)return;const m=$("#summernote");if(m){a=!0;const t=/<[a-z][\s\S]*>/i.test(c);s||(m.summernote("fullscreen.toggle"),s=!0),r&&!t&&(c=((c||"")+"").replace(/\t/g," ").replace(/\r\n|\r|\n/g,"
"));let n=!1;if(function(e){const t=(new DOMParser).parseFromString(`
${e}`,"text/html");return Array.from(t.body.childNodes).some((e=>"SCRIPT"==e.nodeName))}(c)){const t=u()[i];t?n=t.trustUnsafeContent||!1:new Promise((e=>{new Stylekit.SKAlert({title:null,text:"We’ve detected that this note contains a script or code snippet which may be unsafe to execute. Scripts executed in the editor have the ability to impersonate as the editor to Standard Notes. Press Continue to mark this script as safe and proceed, or Cancel to avoid rendering this note.",buttons:[{text:"Cancel",style:"neutral",action:function(){e(!1)}},{text:"Continue",style:"danger",action:function(){e(!0)}}]}).present()})).then((t=>{t&&(function(t,n){const o=u();o[i]={trustUnsafeContent:n},e.setComponentDataValueForKey("notes",o)}(0,t),n=t)}))}else n=!0;if(!n)return m.summernote("code",""),void m.summernote("disable");m.summernote("enable"),m.summernote("code",c),r&&(m.summernote("commit"),r=!1),a=!1}}(l)}))}));
+document.addEventListener("DOMContentLoaded",(function(){let e,t,n,o,i,a=!1,r=!0,s=!1;const l=["address","article","aside","blockquote","details","dialog","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","ol","p","pre","section","table","ul"].join(", ");function c(){if(t){const i=t;e.saveItemWithPresave(i,(()=>{o=$("#summernote").summernote("code"),i.clientData=n,i.content.text=o,i.content.preview_plain=function(e,t=90){return e.length<=t?e:e.substring(0,t)+"..."}(function(e){const t=document.implementation.createHTMLDocument("New").body;return t.innerHTML=e,t.textContent||t.innerText||""}(o)),i.content.preview_html=null}))}}function d(){return e.getComponentDataValueForKey("notes")||{}}$("#summernote").summernote({height:500,minHeight:null,maxHeight:null,focus:!0,tabDisable:!0,showDomainOnlyForAutolink:!1,toolbar:[["para",["style"]],["style",["bold","italic","underline","strikethrough","clear"]],["fontsize",["fontsize","fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["height",["height"]],["insert",["table","link","hr","picture","video"]],["misc",["codeview","help"]]],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Monospace","Roboto","system-ui","Tahoma","Times New Roman","Verdana"],callbacks:{onInit:function(){},onImageUpload:function(){alert("Embedding encrypted images directly inside the editor is not presently supported. You can attach files to be outside the editor instead. For embedding images directly inside this note, use the Image button in the toolbar and insert the URL of an image hosted externally (outside of Standard Notes). For more information, visit https://standardnotes.com/help/36/how-do-i-attach-encrypted-files-to-my-notes.")}}}),$("#summernote").on("summernote.change",(function(){document.querySelectorAll(l).forEach((e=>e.setAttribute("dir","auto"))),a||c()})),$("textarea.note-codable").on("input",(()=>{c()})),e=new ComponentRelay({initialPermissions:[{name:"stream-context-item"}],targetWindow:window,onReady:()=>{const t=e.platform;t&&document.body.classList.add(t)}}),e.streamContextItem((l=>{!function(l){if(l.uuid!==i&&(o=null,r=!0,i=l.uuid),t=l,l.isMetadataUpdate)return;n=l.clientData;let c=l.content.text;if($(".note-editable").attr("spellcheck",JSON.stringify(l.content.spellcheck)),c==o)return;const u=$("#summernote");if(u){a=!0;const t=/<[a-z][\s\S]*>/i.test(c);s||(u.summernote("fullscreen.toggle"),s=!0),r&&!t&&(c=((c||"")+"").replace(/\t/g," ").replace(/\r\n|\r|\n/g,"
"));let n=!1;if(function(e){const t=(new DOMParser).parseFromString(`${e}`,"text/html");return Array.from(t.body.childNodes).some((e=>"SCRIPT"==e.nodeName))}(c)){const t=d()[i];t?n=t.trustUnsafeContent||!1:new Promise((e=>{new Stylekit.SKAlert({title:null,text:"We’ve detected that this note contains a script or code snippet which may be unsafe to execute. Scripts executed in the editor have the ability to impersonate as the editor to Standard Notes. Press Continue to mark this script as safe and proceed, or Cancel to avoid rendering this note.",buttons:[{text:"Cancel",style:"neutral",action:function(){e(!1)}},{text:"Continue",style:"danger",action:function(){e(!0)}}]}).present()})).then((t=>{t&&(function(t,n){const o=d();o[i]={trustUnsafeContent:n},e.setComponentDataValueForKey("notes",o)}(0,t),n=t)}))}else n=!0;if(!n)return u.summernote("code",""),void u.summernote("disable");u.summernote("enable"),u.summernote("code",c),r&&(u.summernote("commit"),r=!1),a=!1}}(l)}))}));
//# sourceMappingURL=dist.js.map
\ No newline at end of file
diff --git a/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js.map b/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js.map
index 4db162535..8097ecd20 100644
--- a/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js.map
+++ b/packages/components/dist/assets/org.standardnotes.plus-editor/dist/dist.js.map
@@ -1 +1 @@
-{"version":3,"file":"dist.js","mappings":"AAAAA,SAASC,iBAAiB,oBAAoB,WAC5C,IAAIC,EACAC,EAAaC,EACbC,EAAWC,EACXC,GAAmB,EACnBC,GAAc,EAChBC,GAAsB,EAExB,MAAMC,EAAc,CAClB,UAAW,UAAW,QAAS,aAAc,UAAW,SAAU,KAClE,MAAO,KAAM,KAAM,WAAY,aAAc,SAAU,SAAU,OACjE,OAAQ,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,SAAU,SAAU,KAChE,KAAM,OAAQ,MAAO,KAAM,IAAK,MAAO,UAAW,QAAS,MAC3DC,KAAK,MAuCP,SAASC,IACP,GAAIT,EAAa,CAMf,MAAMU,EAAOV,EAEbD,EAAeY,oBAAoBD,GAAM,KACvCR,EAAYU,EAAE,eAAeC,WAAW,QACxCH,EAAKT,WAAaA,EAElBS,EAAKI,QAAQC,KAAOb,EACpBQ,EAAKI,QAAQE,cAtBnB,SAAw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,IAAKA,EAGH,OAFA1D,EAAWA,WAAW,OAAQ,SAC9BA,EAAWA,WAAW,WAIxBA,EAAWA,WAAW,UACtBA,EAAWA,WAAW,OAAQkD,GAE1B1D,IAIFQ,EAAWA,WAAW,UACtBR,GAAc,GAGhBD,GAAmB,GApHnBgG,CAAe1F","sources":["webpack://@standardnotes/rich-text/./src/main.js"],"sourcesContent":["document.addEventListener('DOMContentLoaded', function () {\n let componentRelay;\n let workingNote, clientData;\n let lastValue, lastUUID;\n let ignoreTextChange = false;\n let newNoteLoad = true,\n didToggleFullScreen = false;\n\n const blockString = [\n 'address', 'article', 'aside', 'blockquote', 'details', 'dialog', 'dd',\n 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form',\n 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr',\n 'li', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul',\n ].join(', ');\n\n function loadComponentRelay() {\n const initialPermissions = [\n {\n name: 'stream-context-item'\n }\n ];\n\n componentRelay = new ComponentRelay({\n initialPermissions,\n targetWindow: window,\n onReady: () => {\n const platform = componentRelay.platform;\n if (platform) {\n document.body.classList.add(platform);\n }\n }\n });\n\n componentRelay.streamContextItem((note) => {\n onReceivedNote(note);\n });\n }\n\n function strip(html) {\n const tmp = document.implementation.createHTMLDocument('New').body;\n tmp.innerHTML = html;\n return tmp.textContent || tmp.innerText || '';\n }\n\n function truncateString(string, limit = 90) {\n if (string.length <= limit) {\n return string;\n } else {\n return string.substring(0, limit) + '...';\n }\n }\n\n function save() {\n if (workingNote) {\n // Be sure to capture this object as a variable, as workingNote may be\n // reassigned in `streamContextItem`, so by the time you modify it in\n // the presave block, it may not be the same object anymore, so the\n // presave values will not be applied to the right object, and it will\n // save incorrectly.\n const note = workingNote;\n\n componentRelay.saveItemWithPresave(note, () => {\n lastValue = $('#summernote').summernote('code');\n note.clientData = clientData;\n\n note.content.text = lastValue;\n note.content.preview_plain = truncateString(strip(lastValue));\n note.content.preview_html = null;\n });\n }\n }\n\n function onReceivedNote(note) {\n if (note.uuid !== lastUUID) {\n // Note changed, reset last values\n lastValue = null;\n newNoteLoad = true;\n lastUUID = note.uuid;\n }\n\n workingNote = note;\n\n // Only update UI on non-metadata updates.\n if (note.isMetadataUpdate) {\n return;\n }\n\n clientData = note.clientData;\n let newText = note.content.text;\n\n $('.note-editable').attr('spellcheck', JSON.stringify(note.content.spellcheck));\n\n if (newText == lastValue) {\n return;\n }\n\n const summernote = $('#summernote');\n if (summernote) {\n ignoreTextChange = true;\n const isHtml = /<[a-z][\\s\\S]*>/i.test(newText);\n\n if (!didToggleFullScreen) {\n summernote.summernote('fullscreen.toggle');\n didToggleFullScreen = true;\n }\n\n if (newNoteLoad && !isHtml) {\n newText = textToHTML(newText);\n }\n\n let renderNote = false;\n const isUnsafeContent = checkIfUnsafeContent(newText);\n\n if (isUnsafeContent) {\n const currentNotePreferences = getCurrentNotePreferences();\n if (!currentNotePreferences) {\n showUnsafeContentAlert().then((result) => {\n if (result) {\n setNotePreferences('trustUnsafeContent', result);\n renderNote = result;\n }\n });\n } else {\n renderNote = currentNotePreferences.trustUnsafeContent || false;\n }\n } else {\n renderNote = true;\n }\n\n /**\n * If the user decides not to continue rendering the note,\n * clear the editor and disable it.\n */\n if (!renderNote) {\n summernote.summernote('code', '');\n summernote.summernote('disable');\n return;\n }\n\n summernote.summernote('enable');\n summernote.summernote('code', newText);\n\n if (newNoteLoad) {\n // Clears history but keeps note contents. Note that this line will\n // trigger a summernote.change event, so be sure to do this inside a\n // `ignoreTextChange` block.\n summernote.summernote('commit');\n newNoteLoad = false;\n }\n\n ignoreTextChange = false;\n }\n }\n\n function getNotePreferences() {\n return componentRelay.getComponentDataValueForKey('notes') || {};\n }\n\n function getCurrentNotePreferences() {\n const notesPreferences = getNotePreferences();\n return notesPreferences[lastUUID];\n }\n\n function setNotePreferences(key, value) {\n const notesPreferences = getNotePreferences();\n notesPreferences[lastUUID] = {\n [key]: value\n };\n componentRelay.setComponentDataValueForKey('notes', notesPreferences);\n }\n\n /**\n * Checks if the content contains at least one script tag.\n */\n function checkIfUnsafeContent(content) {\n const doc = new DOMParser().parseFromString(`${content}`, 'text/html');\n return Array.from(doc.body.childNodes).some(node => node.nodeName == 'SCRIPT');\n }\n\n function showUnsafeContentAlert() {\n const text = 'We’ve detected that this note contains a script or code snippet which may be unsafe to execute. ' +\n 'Scripts executed in the editor have the ability to impersonate as the editor to Standard Notes. ' +\n 'Press Continue to mark this script as safe and proceed, or Cancel to avoid rendering this note.';\n\n return new Promise((resolve) => {\n const alert = new Stylekit.SKAlert({\n title: null,\n text,\n buttons: [\n {\n text: 'Cancel',\n style: 'neutral',\n action: function() {\n resolve(false);\n },\n },\n {\n text: 'Continue',\n style: 'danger',\n action: function() {\n resolve(true);\n },\n },\n ]\n });\n alert.present();\n });\n }\n\n function loadEditor() {\n $('#summernote').summernote({\n height: 500, // set editor height\n minHeight: null, // set minimum height of editor\n maxHeight: null, // set maximum height of editor\n focus: true, // set focus to editable area after initializing summernote\n tabDisable: true, // set tab interaction to note only\n showDomainOnlyForAutolink: false, // set autolink to preserve whole link\n toolbar: [\n // [groupName, [list of button]]\n ['para', ['style']],\n ['style', ['bold', 'italic', 'underline', 'strikethrough', 'clear']],\n ['fontsize', ['fontsize', 'fontname']],\n ['color', ['color']],\n ['para', ['ul', 'ol', 'paragraph']],\n ['height', ['height']],\n ['insert', ['table', 'link', 'hr', 'picture', 'video']],\n ['misc', ['codeview', 'help']]\n ],\n fontNames: [\n 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New',\n 'Helvetica Neue', 'Helvetica', 'Impact', 'Lucida Grande', 'Monospace',\n 'Roboto', 'system-ui', 'Tahoma', 'Times New Roman', 'Verdana'\n ],\n callbacks: {\n onInit: function () {},\n onImageUpload: function () {\n alert('Until we can encrypt image files, uploads are not currently '\n + 'supported. We recommend using the Image button in the toolbar '\n + 'and copying an image URL instead.');\n }\n }\n });\n\n // summernote.change\n $('#summernote').on('summernote.change', function () {\n // Add RTL support when block-level elements are detect onchange.\n document.querySelectorAll(blockString)\n .forEach(element => element.setAttribute('dir', 'auto'));\n\n if (!ignoreTextChange) {\n save();\n }\n });\n\n $('textarea.note-codable').on('input', () => {\n save();\n });\n }\n\n loadEditor();\n loadComponentRelay();\n\n function textToHTML(text) {\n return ((text || '') + '')\n .replace(/\\t/g, ' ')\n .replace(/\\r\\n|\\r|\\n/g, '
');\n }\n});\n"],"names":["document","addEventListener","componentRelay","workingNote","clientData","lastValue","lastUUID","ignoreTextChange","newNoteLoad","didToggleFullScreen","blockString","join","save","note","saveItemWithPresave","$","summernote","content","text","preview_plain","string","limit","length","substring","truncateString","html","tmp","implementation","createHTMLDocument","body","innerHTML","textContent","innerText","strip","preview_html","getNotePreferences","getComponentDataValueForKey","height","minHeight","maxHeight","focus","tabDisable","showDomainOnlyForAutolink","toolbar","fontNames","callbacks","onInit","onImageUpload","alert","on","querySelectorAll","forEach","element","setAttribute","ComponentRelay","initialPermissions","name","targetWindow","window","onReady","platform","classList","add","streamContextItem","uuid","isMetadataUpdate","newText","attr","JSON","stringify","spellcheck","isHtml","test","replace","renderNote","doc","DOMParser","parseFromString","Array","from","childNodes","some","node","nodeName","checkIfUnsafeContent","currentNotePreferences","trustUnsafeContent","Promise","resolve","Stylekit","SKAlert","title","buttons","style","action","present","then","result","key","value","notesPreferences","setComponentDataValueForKey","setNotePreferences","onReceivedNote"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"dist.js","mappings":"AAAAA,SAASC,iBAAiB,oBAAoB,WAC5C,IAAIC,EACAC,EAAaC,EACbC,EAAWC,EACXC,GAAmB,EACnBC,GAAc,EAChBC,GAAsB,EAExB,MAAMC,EAAc,CAClB,UAAW,UAAW,QAAS,aAAc,UAAW,SAAU,KAClE,MAAO,KAAM,KAAM,WAAY,aAAc,SAAU,SAAU,OACjE,OAAQ,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,SAAU,SA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AAQ,KAGZ,CACEtE,KAAM,WACN2E,MAAO,SACPC,OAAQ,WACNN,GAAQ,QAKVO,aAzFuBC,MAAMC,IACzBA,IA8Cd,SAA4BC,EAAKC,GAC/B,MAAMC,EAAmBjE,IACzBiE,EAAiB9F,GAAY,CAC3B,mBAAO6F,GAETjG,EAAemG,4BAA4B,QAASD,GAlD1CE,CAAmB,EAAsBL,GACzCvB,EAAauB,WAOnBvB,GAAa,EAOf,IAAKA,EAGH,OAFA1D,EAAWA,WAAW,OAAQ,SAC9BA,EAAWA,WAAW,WAIxBA,EAAWA,WAAW,UACtBA,EAAWA,WAAW,OAAQkD,GAE1B1D,IAIFQ,EAAWA,WAAW,UACtBR,GAAc,GAGhBD,GAAmB,GApHnBgG,CAAe1F","sources":["webpack://@standardnotes/rich-text/./src/main.js"],"sourcesContent":["document.addEventListener('DOMContentLoaded', function () {\n let componentRelay;\n let workingNote, clientData;\n let lastValue, lastUUID;\n let ignoreTextChange = false;\n let newNoteLoad = true,\n didToggleFullScreen = false;\n\n const blockString = [\n 'address', 'article', 'aside', 'blockquote', 'details', 'dialog', 'dd',\n 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form',\n 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr',\n 'li', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul',\n ].join(', ');\n\n function loadComponentRelay() {\n const initialPermissions = [\n {\n name: 'stream-context-item'\n }\n ];\n\n componentRelay = new ComponentRelay({\n initialPermissions,\n targetWindow: window,\n onReady: () => {\n const platform = componentRelay.platform;\n if (platform) {\n document.body.classList.add(platform);\n }\n }\n });\n\n componentRelay.streamContextItem((note) => {\n onReceivedNote(note);\n });\n }\n\n function strip(html) {\n const tmp = document.implementation.createHTMLDocument('New').body;\n tmp.innerHTML = html;\n return tmp.textContent || tmp.innerText || '';\n }\n\n function truncateString(string, limit = 90) {\n if (string.length <= limit) {\n return string;\n } else {\n return string.substring(0, limit) + '...';\n }\n }\n\n function save() {\n if (workingNote) {\n // Be sure to capture this object as a variable, as workingNote may be\n // reassigned in `streamContextItem`, so by the time you modify it in\n // the presave block, it may not be the same object anymore, so the\n // presave values will not be applied to the right object, and it will\n // save incorrectly.\n const note = workingNote;\n\n componentRelay.saveItemWithPresave(note, () => {\n lastValue = $('#summernote').summernote('code');\n note.clientData = clientData;\n\n note.content.text = lastValue;\n note.content.preview_plain = truncateString(strip(lastValue));\n note.content.preview_html = null;\n });\n }\n }\n\n function onReceivedNote(note) {\n if (note.uuid !== lastUUID) {\n // Note changed, reset last values\n lastValue = null;\n newNoteLoad = true;\n lastUUID = note.uuid;\n }\n\n workingNote = note;\n\n // Only update UI on non-metadata updates.\n if (note.isMetadataUpdate) {\n return;\n }\n\n clientData = note.clientData;\n let newText = note.content.text;\n\n $('.note-editable').attr('spellcheck', JSON.stringify(note.content.spellcheck));\n\n if (newText == lastValue) {\n return;\n }\n\n const summernote = $('#summernote');\n if (summernote) {\n ignoreTextChange = true;\n const isHtml = /<[a-z][\\s\\S]*>/i.test(newText);\n\n if (!didToggleFullScreen) {\n summernote.summernote('fullscreen.toggle');\n didToggleFullScreen = true;\n }\n\n if (newNoteLoad && !isHtml) {\n newText = textToHTML(newText);\n }\n\n let renderNote = false;\n const isUnsafeContent = checkIfUnsafeContent(newText);\n\n if (isUnsafeContent) {\n const currentNotePreferences = getCurrentNotePreferences();\n if (!currentNotePreferences) {\n showUnsafeContentAlert().then((result) => {\n if (result) {\n setNotePreferences('trustUnsafeContent', result);\n renderNote = result;\n }\n });\n } else {\n renderNote = currentNotePreferences.trustUnsafeContent || false;\n }\n } else {\n renderNote = true;\n }\n\n /**\n * If the user decides not to continue rendering the note,\n * clear the editor and disable it.\n */\n if (!renderNote) {\n summernote.summernote('code', '');\n summernote.summernote('disable');\n return;\n }\n\n summernote.summernote('enable');\n summernote.summernote('code', newText);\n\n if (newNoteLoad) {\n // Clears history but keeps note contents. Note that this line will\n // trigger a summernote.change event, so be sure to do this inside a\n // `ignoreTextChange` block.\n summernote.summernote('commit');\n newNoteLoad = false;\n }\n\n ignoreTextChange = false;\n }\n }\n\n function getNotePreferences() {\n return componentRelay.getComponentDataValueForKey('notes') || {};\n }\n\n function getCurrentNotePreferences() {\n const notesPreferences = getNotePreferences();\n return notesPreferences[lastUUID];\n }\n\n function setNotePreferences(key, value) {\n const notesPreferences = getNotePreferences();\n notesPreferences[lastUUID] = {\n [key]: value\n };\n componentRelay.setComponentDataValueForKey('notes', notesPreferences);\n }\n\n /**\n * Checks if the content contains at least one script tag.\n */\n function checkIfUnsafeContent(content) {\n const doc = new DOMParser().parseFromString(`${content}`, 'text/html');\n return Array.from(doc.body.childNodes).some(node => node.nodeName == 'SCRIPT');\n }\n\n function showUnsafeContentAlert() {\n const text = 'We’ve detected that this note contains a script or code snippet which may be unsafe to execute. ' +\n 'Scripts executed in the editor have the ability to impersonate as the editor to Standard Notes. ' +\n 'Press Continue to mark this script as safe and proceed, or Cancel to avoid rendering this note.';\n\n return new Promise((resolve) => {\n const alert = new Stylekit.SKAlert({\n title: null,\n text,\n buttons: [\n {\n text: 'Cancel',\n style: 'neutral',\n action: function() {\n resolve(false);\n },\n },\n {\n text: 'Continue',\n style: 'danger',\n action: function() {\n resolve(true);\n },\n },\n ]\n });\n alert.present();\n });\n }\n\n function loadEditor() {\n $('#summernote').summernote({\n height: 500, // set editor height\n minHeight: null, // set minimum height of editor\n maxHeight: null, // set maximum height of editor\n focus: true, // set focus to editable area after initializing summernote\n tabDisable: true, // set tab interaction to note only\n showDomainOnlyForAutolink: false, // set autolink to preserve whole link\n toolbar: [\n // [groupName, [list of button]]\n ['para', ['style']],\n ['style', ['bold', 'italic', 'underline', 'strikethrough', 'clear']],\n ['fontsize', ['fontsize', 'fontname']],\n ['color', ['color']],\n ['para', ['ul', 'ol', 'paragraph']],\n ['height', ['height']],\n ['insert', ['table', 'link', 'hr', 'picture', 'video']],\n ['misc', ['codeview', 'help']]\n ],\n fontNames: [\n 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New',\n 'Helvetica Neue', 'Helvetica', 'Impact', 'Lucida Grande', 'Monospace',\n 'Roboto', 'system-ui', 'Tahoma', 'Times New Roman', 'Verdana'\n ],\n callbacks: {\n onInit: function () {},\n onImageUpload: function () {\n alert('Embedding encrypted images directly inside the editor is not presently supported. You can attach files to be outside the editor instead. For embedding images directly inside this note, use the Image button in the toolbar and insert the URL of an image hosted externally (outside of Standard Notes). For more information, visit https://standardnotes.com/help/36/how-do-i-attach-encrypted-files-to-my-notes.');\n }\n }\n });\n\n // summernote.change\n $('#summernote').on('summernote.change', function () {\n // Add RTL support when block-level elements are detect onchange.\n document.querySelectorAll(blockString)\n .forEach(element => element.setAttribute('dir', 'auto'));\n\n if (!ignoreTextChange) {\n save();\n }\n });\n\n $('textarea.note-codable').on('input', () => {\n save();\n });\n }\n\n loadEditor();\n loadComponentRelay();\n\n function textToHTML(text) {\n return ((text || '') + '')\n .replace(/\\t/g, ' ')\n .replace(/\\r\\n|\\r|\\n/g, '
');\n }\n});\n"],"names":["document","addEventListener","componentRelay","workingNote","clientData","lastValue","lastUUID","ignoreTextChange","newNoteLoad","didToggleFullScreen","blockString","join","save","note","saveItemWithPresave","$","summernote","content","text","preview_plain","string","limit","length","substring","truncateString","html","tmp","implementation","createHTMLDocument","body","innerHTML","textContent","innerText","strip","preview_html","getNotePreferences","getComponentDataValueForKey","height","minHeight","maxHeight","focus","tabDisable","showDomainOnlyForAutolink","toolbar","fontNames","callbacks","onInit","onImageUpload","alert","on","querySelectorAll","forEach","element","setAttribute","ComponentRelay","initialPermissions","name","targetWindow","window","onReady","platform","classList","add","streamContextItem","uuid","isMetadataUpdate","newText","attr","JSON","stringify","spellcheck","isHtml","test","replace","renderNote","doc","DOMParser","parseFromString","Array","from","childNodes","some","node","nodeName","checkIfUnsafeContent","currentNotePreferences","trustUnsafeContent","Promise","resolve","Stylekit","SKAlert","title","buttons","style","action","present","then","result","key","value","notesPreferences","setComponentDataValueForKey","setNotePreferences","onReceivedNote"],"sourceRoot":""}
\ No newline at end of file
diff --git a/packages/components/dist/zips/checksums.json b/packages/components/dist/zips/checksums.json
index 2310d726e..8027996f8 100644
--- a/packages/components/dist/zips/checksums.json
+++ b/packages/components/dist/zips/checksums.json
@@ -45,9 +45,9 @@
"binary": "deaece4cd37801f796eca2bf37fcccabfc6ddc43581630aa9ed04b9b0f7a7762"
},
"org.standardnotes.plus-editor": {
- "version": "1.6.6",
- "base64": "89cceec289f023b68fc5a76832730a145ebac612da9b33610de48c2f0353da0e",
- "binary": "a728c207ccf79c41852f00afeda2ed3384485bbd616c2abaca06ab317ea1ec79"
+ "version": "1.7.0",
+ "base64": "a63f79a3b6398ab13f8a4e106bbfc06312d31336967bbc5d2aa16c0c94ee08bb",
+ "binary": "fd258ce43577024cbe297904963b1beabe239d053b7666b7e469cf1aaf0abd8d"
},
"org.standardnotes.simple-markdown-editor": {
"version": "1.4.7",
diff --git a/packages/components/dist/zips/org.standardnotes.plus-editor.zip b/packages/components/dist/zips/org.standardnotes.plus-editor.zip
index 601e6df50..10e470988 100644
Binary files a/packages/components/dist/zips/org.standardnotes.plus-editor.zip and b/packages/components/dist/zips/org.standardnotes.plus-editor.zip differ