Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: migrate from quill to tinymce (#164)

Abdullah Atta88381260f1f0
diff --git a/apps/web/package.json b/apps/web/package.json
index 8e8ac94b8..9cba39654 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -8,6 +8,7 @@
"@rebass/forms": "^4.0.6",
"@sentry/react": "^5.29.2",
"@sentry/tracing": "^5.29.2",
+ "@tinymce/tinymce-react": "^3.9.0",
"clipboard": "^2.0.6",
"cogo-toast": "^4.2.3",
"dayjs": "^1.9.1",
@@ -15,6 +16,7 @@
"eventsource": "^1.0.7",
"fast-sort": "^2.1.1",
"framer-motion": "^2.6.15",
+ "html-differ": "^1.4.0",
"immer": "^6.0.3",
"localforage": "^1.7.3",
"localforage-getitems": "https://github.com/thecodrr/localForage-getItems.git",
@@ -33,6 +35,7 @@
"react-window": "^1.8.6",
"rebass": "^4.0.7",
"timeago-react": "^3.0.0",
+ "tinymce": "^5.6.2",
"uzip": "^0.20201126.0",
"wouter": "^2.7.0",
"zustand": "^2.2.3"
diff --git a/apps/web/public/skins/notesnook-dark/content.min.css b/apps/web/public/skins/notesnook-dark/content.min.css
new file mode 100644
index 000000000..2384fe5d2
--- /dev/null
+++ b/apps/web/public/skins/notesnook-dark/content.min.css
@@ -0,0 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-resize-backdrop{z-index:10000}.mce-content-body .mce-clonedresizable{cursor:default;opacity:.5;outline:1px dashed #000;position:absolute;z-index:10001}.mce-content-body .mce-clonedresizable.mce-resizetable-columns td,.mce-content-body .mce-clonedresizable.mce-resizetable-columns th{border:0}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10002}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::-moz-selection{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body audio[data-mce-selected],.mce-content-body embed[data-mce-selected],.mce-content-body img[data-mce-selected],.mce-content-body object[data-mce-selected],.mce-content-body table[data-mce-selected],.mce-content-body video[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{position:relative}.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background:0 0}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{outline:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{background-color:rgba(180,215,255,.7);border:1px solid rgba(180,215,255,.7);bottom:-1px;content:'';left:-1px;mix-blend-mode:multiply;position:absolute;right:-1px;top:-1px}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{border-color:rgba(0,84,180,.7)}}.mce-content-body img::-moz-selection{background:0 0}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table:not([border]),.mce-item-table:not([border]) caption,.mce-item-table:not([border]) td,.mce-item-table:not([border]) th,.mce-item-table[border="0"],.mce-item-table[border="0"] caption,.mce-item-table[border="0"] td,.mce-item-table[border="0"] th,table[style*="border-width: 0px"],table[style*="border-width: 0px"] caption,table[style*="border-width: 0px"] td,table[style*="border-width: 0px"] th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}body{background-color:#1f1f1f;color:#d3d3d3;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#7b7b7b}figure{display:table;margin:1rem auto}figure figcaption{color:#7b7b7b;display:block;margin-top:.25rem;text-align:center}hr{border-color:#7b7b7b;border-style:solid;border-width:1px 0 0 0}code{background-color:#7b7b7b;border-radius:5px;padding:.1rem .2rem}pre{background-color:#4b4b4b;border-radius:5px;color:#ebebeb;font-size:1.1rem;line-height:1.3rem;padding:1rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #7b7b7b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #7b7b7b;margin-right:1.5rem;padding-right:1rem}
+/*# sourceMappingURL=content.min.css.map */
diff --git a/apps/web/public/skins/notesnook-dark/skin.min.css b/apps/web/public/skins/notesnook-dark/skin.min.css
new file mode 100644
index 000000000..48c5caa11
--- /dev/null
+++ b/apps/web/public/skins/notesnook-dark/skin.min.css
@@ -0,0 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tox{box-shadow:none;box-sizing:content-box;color:#202124;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:0 solid #000;border-radius:0;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox-tinymce-inline{border:none;box-shadow:none}.tox-tinymce-inline .tox-editor-header{border:0 solid #000;border-radius:0;box-shadow:none}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border:1px solid #000;border-radius:3px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>:last-child:not(:only-child){border-color:#000;border-style:solid}.tox .accessibility-issue__repair{margin-top:16px}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:rgba(32,122,183,.5);border-color:#207ab7;color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description>:last-child{border-color:#207ab7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg{fill:#fff}.tox .tox-dialog__body-content .accessibility-issue--info a .tox-icon{color:#fff}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.5);border-color:rgba(255,165,0,.8);color:#fff}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description>:last-child{border-color:rgba(255,165,0,.8)}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{color:#fff}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg{fill:#fff}.tox .tox-dialog__body-content .accessibility-issue--warn a .tox-icon{color:#fff}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.5);border-color:rgba(204,0,0,.8);color:#fff}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description>:last-child{border-color:rgba(204,0,0,.8)}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{color:#fff}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg{fill:#fff}.tox .tox-dialog__body-content .accessibility-issue--error a .tox-icon{color:#fff}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.5);border-color:rgba(120,171,70,.8);color:#fff}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{border-color:rgba(120,171,70,.8)}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#fff}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg{fill:#fff}.tox .tox-dialog__body-content .accessibility-issue--success a .tox-icon{color:#fff}.tox .tox-dialog__body-content .accessibility-issue__header h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:4px 4px 4px 8px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description>:last-child{border-left-width:1px;padding-left:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description>:last-child{border-right-width:1px;padding-right:4px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#207ab7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#207ab7;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;text-align:center;text-decoration:none;text-transform:capitalize;white-space:nowrap}.tox .tox-button[disabled]{background-color:#207ab7;background-image:none;border-color:#207ab7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:hover:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#185d8c;background-image:none;border-color:#185d8c;box-shadow:none;color:#fff}.tox .tox-button--secondary{background-color:#454545;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#454545;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;color:#fff;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;text-decoration:none;text-transform:capitalize}.tox .tox-button--secondary[disabled]{background-color:#454545;background-image:none;border-color:#454545;box-shadow:none;color:rgba(255,255,255,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#393939;background-image:none;border-color:#393939;box-shadow:none;color:#fff}.tox .tox-button--secondary:hover:not(:disabled){background-color:#393939;background-image:none;border-color:#393939;box-shadow:none;color:#fff}.tox .tox-button--secondary:active:not(:disabled){background-color:#2c2c2c;background-image:none;border-color:#2c2c2c;box-shadow:none;color:#fff}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#fff}.tox .tox-button--naked[disabled]{background-color:#454545;border-color:#454545;box-shadow:none;color:rgba(255,255,255,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:#393939;border-color:#393939;box-shadow:none;color:#fff}.tox .tox-button--naked:focus:not(:disabled){background-color:#393939;border-color:#393939;box-shadow:none;color:#fff}.tox .tox-button--naked:active:not(:disabled){background-color:#2c2c2c;border-color:#2c2c2c;box-shadow:none;color:#fff}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#fff}.tox .tox-checkbox{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:3px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(255,255,255,.2)}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#207ab7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#207ab7}.tox .tox-checkbox--disabled{color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(255,255,255,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(255,255,255,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(255,255,255,.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:3px;box-shadow:inset 0 0 0 1px #207ab7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#1a1a1a;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#333;color:#fff;cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;color:#fff;cursor:pointer;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#2c2c2c;color:#fff}.tox .tox-collection--list .tox-collection__item--active{background-color:#414245}.tox .tox-collection--toolbar .tox-collection__item--enabled{background-color:#6e6f71;color:#fff}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#414245}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#6e6f71;color:#fff}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#414245;color:#fff}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#fff}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#fff}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;-ms-flex-preferred-size:auto;font-size:14px;font-style:normal;font-weight:400;line-height:24px;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:rgba(255,255,255,.5);display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:#fff}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#2c2c2c;border:1px solid #1a1a1a;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:34px;margin:2px 0 3px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{-ms-grid-row-align:center;align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{-ms-grid-row-align:center;align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid #000}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid #000}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg{transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:2px 0 3px 10px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px 0}.tox .tox-swatches__row{display:flex}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#414245}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#2c2c2c;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#2c2c2c;border:1px solid #000;border-radius:3px;box-shadow:0 4px 8px 0 rgba(32,33,36,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#fff;display:flex;justify-content:space-between}.tox .tox-comment__date{color:rgba(255,255,255,.5);font-size:12px}.tox .tox-comment__body{color:#fff;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(255,255,255,.5);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#2c2c2c;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(44,44,44,0),#2c2c2c);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#2c2c2c;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#fff;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#2c2c2c;box-shadow:0 0 8px 8px #2c2c2c;color:#fff;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#2c2c2c;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(255,255,255,.5)}.tox .tox-user__name{color:rgba(255,255,255,.5);font-size:12px;font-style:normal;font-weight:700;text-transform:uppercase}.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(31,31,31,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#1f1f1f}.tox .tox-dialog{background-color:#2c2c2c;border-color:#000;border-radius:3px;border-style:solid;border-width:1px;box-shadow:0 16px 16px -10px rgba(32,33,36,.15),0 0 40px 1px rgba(32,33,36,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#2c2c2c;border-bottom:none;color:#fff;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#fff;display:flex;flex:1;-ms-flex-preferred-size:auto;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;padding:16px 16px}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(255,255,255,.5);display:inline-block;font-size:14px;line-height:1.3;margin-bottom:8px;text-decoration:none;white-space:nowrap}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(32,122,183,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #207ab7;color:#207ab7}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto;max-height:650px;overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#207ab7;cursor:pointer;text-decoration:none}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content a:active{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content svg{fill:#fff}.tox .tox-dialog__body-content ul{display:block;list-style-type:disc;margin-bottom:16px;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.tox .tox-dialog__body-content .tox-form__group h1{color:#fff;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#fff;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#2c2c2c;border-top:1px solid #000;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(31,31,31,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #000}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}.tox.tox-platform-ie .tox-dialog-wrap{position:-ms-device-fixed}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #000;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(255,255,255,.5);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;-ms-flex-preferred-size:auto;overflow:hidden;position:relative}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;-ms-flex-preferred-size:auto;height:100%;position:absolute;width:100%}.tox.tox-inline-edit-area{border:1px dotted #000}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{z-index:1}.tox:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:none;transition:box-shadow .5s}.tox.tox-tinymce--toolbar-bottom .tox-editor-header,.tox.tox-tinymce-inline .tox-editor-header{margin-bottom:-1px}.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header{box-shadow:0 4px 4px -3px rgba(0,0,0,.25)}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(32,33,36,.2);border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#207ab7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(255,255,255,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(255,255,255,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(255,255,255,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #2c2c2c;border-radius:3px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(255,255,255,.5);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-textarea{flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#2c2c2c;border-color:#000;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 4.75px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#1f1f1f;color:rgba(255,255,255,.85);cursor:not-allowed}.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{background-color:#2c2c2c;border-color:#207ab7;box-shadow:none;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#207ab7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#fff}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#121212;color:rgba(255,255,255,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#fff}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#2c2c2c;border-color:#000;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 4.75px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#121212;color:rgba(255,255,255,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#2c2c2c;border-color:#207ab7;box-shadow:none;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea{-webkit-appearance:textarea;-moz-appearance:textarea;appearance:textarea;white-space:pre-wrap}.tox-fullscreen{border:0;height:100%;left:0;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;position:fixed;top:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox.tox-tinymce.tox-fullscreen{background-color:transparent;z-index:1200}.tox-shadowhost.tox-fullscreen{z-index:1200}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-image-tools{width:100%}.tox .tox-image-tools__toolbar{align-items:center;display:flex;justify-content:center}.tox .tox-image-tools__image{background-color:#666;height:380px;overflow:auto;position:relative;width:100%}.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top:8px}.tox .tox-image-tools__image-bg{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools__toolbar>.tox-spacer{flex:1;-ms-flex-preferred-size:auto}.tox .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left:8px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left:32px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right:8px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right:32px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#000;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px 0}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(32,122,183,.5);border-color:rgba(32,122,183,.5)}.tox .tox-insert-table-picker__label{color:#fff;display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#2c2c2c;border:1px solid #000;border-radius:3px;box-shadow:0 4px 8px 0 rgba(32,33,36,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:4px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:4px}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #1f1f1f;background-color:#1f1f1f;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 10px 0 10px}.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar{border-top:1px solid #000}.tox .tox-mbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#fff;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:transparent;border:0;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#414245;border:0;box-shadow:none;color:#fff}.tox .tox-mbtn--active{background:#6e6f71;border:0;box-shadow:none;color:#fff}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#414245;border:0;box-shadow:none;color:#fff}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:-ms-grid;display:grid;font-size:14px;font-weight:400;-ms-grid-columns:minmax(40px,1fr) auto minmax(40px,1fr);grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification a{text-decoration:underline}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#fff}.tox .tox-notification--success p{color:#fff}.tox .tox-notification--success a{color:#547831}.tox .tox-notification--success svg{fill:#fff}.tox .tox-notification--error{background-color:#f8dede;border-color:#f2bfbf;color:#fff}.tox .tox-notification--error p{color:#fff}.tox .tox-notification--error a{color:#c00}.tox .tox-notification--error svg{fill:#fff}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fffaea;border-color:#ffe89d;color:#fff}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#fff}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#fff}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#fff}.tox .tox-notification--info{background-color:#d9edf7;border-color:#779ecb;color:#fff}.tox .tox-notification--info p{color:#fff}.tox .tox-notification--info a{color:#fff}.tox .tox-notification--info svg{fill:#fff}.tox .tox-notification__body{-ms-grid-row-align:center;align-self:center;color:#fff;font-size:14px;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-column:2;grid-column-start:2;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{-ms-grid-row-align:center;align-self:center;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{-ms-grid-row-align:start;align-self:start;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-column:3;grid-column-start:3;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification .tox-progress-bar{-ms-grid-column-span:3;grid-column-end:4;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:3;-ms-grid-row:2;grid-row-start:2;-ms-grid-column-align:center;justify-self:center}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar{flex-wrap:nowrap}.tox .tox-pop__dialog{background-color:#1f1f1f;border:1px solid #000;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;position:absolute;width:0}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#1f1f1f transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#000 transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #1f1f1f transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #000 transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #1f1f1f transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #000 transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #1f1f1f;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #000;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;-ms-flex-preferred-size:0;min-height:0}.tox .tox-sidebar{background-color:#1f1f1f;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;-ms-flex-preferred-size:auto;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #000;border-radius:3px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#207ab7;border:2px solid #185d8c;border-radius:3px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(255,255,255,.5);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:nth-child(1){animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#1f1f1f;border-top:1px solid #000;color:#fff;display:flex;flex:0 0 auto;font-size:12px;font-weight:400;height:18px;overflow:hidden;padding:0 8px;position:relative;text-transform:uppercase}.tox .tox-statusbar__text-container{display:flex;flex:1 1 auto;justify-content:flex-end;overflow:hidden}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:#fff;text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){cursor:pointer;text-decoration:underline}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-8px;padding-left:1ch}.tox .tox-statusbar__resize-handle svg{display:block;fill:#fff}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:1ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(31,31,31,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#fff;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0;text-transform:none;width:34px}.tox .tox-tbtn svg{display:block;fill:#fff}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#414245;border:0;box-shadow:none}.tox .tox-tbtn:hover{background:#414245;border:0;box-shadow:none;color:#fff}.tox .tox-tbtn:hover svg{fill:#fff}.tox .tox-tbtn:active{background:#6e6f71;border:0;box-shadow:none;color:#fff}.tox .tox-tbtn:active svg{fill:#fff}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(255,255,255,.5)}.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:hover{background:#6e6f71;border:0;box-shadow:none;color:#fff}.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:hover svg{fill:#fff}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#fff}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#fff}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:51px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:68px;width:68px}.tox .tox-tbtn--return{-ms-grid-row-align:stretch;align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tbtn--select{margin:2px 0 3px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(255,255,255,.5)}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:2px 0 3px 0;overflow:hidden}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #414245 inset}.tox .tox-split-button:focus{background:#414245;box-shadow:none;color:#fff}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(255,255,255,.5)}.tox .tox-split-button .tox-tbtn{margin:0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:0 0;box-shadow:none;color:rgba(255,255,255,.5)}.tox .tox-toolbar-overlord{background-color:#1f1f1f}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #1f1f1f;background-color:#1f1f1f;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord .tox-toolbar__primary{border-top:1px solid #000;margin-top:-1px}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child{border-top:1px solid #000}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#1f1f1f;border:1px solid #000;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}.tox[dir=rtl] .tox-tbtn__icon-rtl svg{transform:rotateY(180deg)}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 10px 0 10px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid #000}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid #000}.tox .tox-tooltip{display:inline-block;padding:8px;position:relative}.tox .tox-tooltip__body{background-color:#454545;border-radius:3px;box-shadow:0 2px 4px rgba(32,33,36,.3);color:rgba(255,255,255,.75);font-size:14px;font-style:normal;font-weight:400;padding:4px 8px;text-transform:none}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #454545;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #454545;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #454545;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #454545;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-well{border:1px solid #000;border-radius:3px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #000;border-radius:3px;display:flex;flex:1;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-image-tools-edit-panel{height:60px}.tox .tox-image-tools__sidebar{height:60px}.tox-menubar+.tox-toolbar,.tox-menubar+.tox-toolbar-overlord .tox-toolbar__primary{border-top:0 solid #000;margin-top:0}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:0 solid #000}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:0 solid #000}
+/*# sourceMappingURL=skin.min.css.map */
diff --git a/apps/web/public/skins/notesnook/content.min.css b/apps/web/public/skins/notesnook/content.min.css
new file mode 100644
index 000000000..277a8ce03
--- /dev/null
+++ b/apps/web/public/skins/notesnook/content.min.css
@@ -0,0 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-resize-backdrop{z-index:10000}.mce-content-body .mce-clonedresizable{cursor:default;opacity:.5;outline:1px dashed #000;position:absolute;z-index:10001}.mce-content-body .mce-clonedresizable.mce-resizetable-columns td,.mce-content-body .mce-clonedresizable.mce-resizetable-columns th{border:0}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10002}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::-moz-selection{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body audio[data-mce-selected],.mce-content-body embed[data-mce-selected],.mce-content-body img[data-mce-selected],.mce-content-body object[data-mce-selected],.mce-content-body table[data-mce-selected],.mce-content-body video[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{position:relative}.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background:0 0}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{outline:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{background-color:rgba(180,215,255,.7);border:1px solid rgba(180,215,255,.7);bottom:-1px;content:'';left:-1px;mix-blend-mode:multiply;position:absolute;right:-1px;top:-1px}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{border-color:rgba(0,84,180,.7)}}.mce-content-body img::-moz-selection{background:0 0}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table:not([border]),.mce-item-table:not([border]) caption,.mce-item-table:not([border]) td,.mce-item-table:not([border]) th,.mce-item-table[border="0"],.mce-item-table[border="0"] caption,.mce-item-table[border="0"] td,.mce-item-table[border="0"] th,table[style*="border-width: 0px"],table[style*="border-width: 0px"] caption,table[style*="border-width: 0px"] td,table[style*="border-width: 0px"] th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}body{background-color:#fff;color:#202124;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#e7e7e7}figure{display:table;margin:1rem auto}figure figcaption{color:#e7e7e7;display:block;margin-top:.25rem;text-align:center}hr{border-color:#e7e7e7;border-style:solid;border-width:1px 0 0 0}code{background-color:#e7e7e7;border-radius:5px;padding:.1rem .2rem}pre{background-color:#f0f0f0;border-radius:5px;color:#3b3b3b;font-size:1.1rem;line-height:1.3rem;padding:1rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #e7e7e7;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #e7e7e7;margin-right:1.5rem;padding-right:1rem}
+/*# sourceMappingURL=content.min.css.map */
diff --git a/apps/web/public/skins/notesnook/skin.min.css b/apps/web/public/skins/notesnook/skin.min.css
new file mode 100644
index 000000000..216cd240f
--- /dev/null
+++ b/apps/web/public/skins/notesnook/skin.min.css
@@ -0,0 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tox{box-shadow:none;box-sizing:content-box;color:#222f3e;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:0 solid #ccc;border-radius:0;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox-tinymce-inline{border:none;box-shadow:none}.tox-tinymce-inline .tox-editor-header{border:0 solid #ccc;border-radius:0;box-shadow:none}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border:1px solid #ccc;border-radius:3px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>:last-child:not(:only-child){border-color:#ccc;border-style:solid}.tox .accessibility-issue__repair{margin-top:16px}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:rgba(32,122,183,.1);border-color:rgba(32,122,183,.4);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description>:last-child{border-color:rgba(32,122,183,.4)}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{color:#207ab7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg{fill:#207ab7}.tox .tox-dialog__body-content .accessibility-issue--info a .tox-icon{color:#207ab7}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.1);border-color:rgba(255,165,0,.5);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description>:last-child{border-color:rgba(255,165,0,.5)}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{color:#cc8500}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg{fill:#cc8500}.tox .tox-dialog__body-content .accessibility-issue--warn a .tox-icon{color:#cc8500}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.1);border-color:rgba(204,0,0,.4);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description>:last-child{border-color:rgba(204,0,0,.4)}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a .tox-icon{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);border-color:rgba(120,171,70,.4);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{border-color:rgba(120,171,70,.4)}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#78ab46}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg{fill:#78ab46}.tox .tox-dialog__body-content .accessibility-issue--success a .tox-icon{color:#78ab46}.tox .tox-dialog__body-content .accessibility-issue__header h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:4px 4px 4px 8px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description>:last-child{border-left-width:1px;padding-left:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description>:last-child{border-right-width:1px;padding-right:4px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#207ab7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#207ab7;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;text-align:center;text-decoration:none;text-transform:capitalize;white-space:nowrap}.tox .tox-button[disabled]{background-color:#207ab7;background-image:none;border-color:#207ab7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:hover:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#185d8c;background-image:none;border-color:#185d8c;box-shadow:none;color:#fff}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#f0f0f0;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;color:#222f3e;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;text-decoration:none;text-transform:capitalize}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked[disabled]{background-color:#f0f0f0;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--naked:focus:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--naked:active:not(:disabled){background-color:#d6d6d6;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#222f3e}.tox .tox-checkbox{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:3px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(34,47,62,.3)}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#207ab7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#207ab7}.tox .tox-checkbox--disabled{color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(34,47,62,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(34,47,62,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(34,47,62,.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:3px;box-shadow:inset 0 0 0 1px #207ab7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#ccc;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#e6e6e6;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;color:#222f3e;cursor:pointer;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active{background-color:#dee0e2}.tox .tox-collection--toolbar .tox-collection__item--enabled{background-color:#c8cbcf;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#dee0e2}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#c8cbcf;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#dee0e2;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;-ms-flex-preferred-size:auto;font-size:14px;font-style:normal;font-weight:400;line-height:24px;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:rgba(34,47,62,.7);display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:#222f3e}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:34px;margin:2px 0 3px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{-ms-grid-row-align:center;align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{-ms-grid-row-align:center;align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid #ccc}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid #ccc}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg{transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:2px 0 3px 10px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px 0}.tox .tox-swatches__row{display:flex}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#dee0e2}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#fff;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:rgba(34,47,62,.7);font-size:12px}.tox .tox-comment__body{color:#222f3e;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,.7)}.tox .tox-user__name{color:rgba(34,47,62,.7);font-size:12px;font-style:normal;font-weight:700;text-transform:uppercase}.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#ccc;border-radius:3px;border-style:solid;border-width:1px;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;-ms-flex-preferred-size:auto;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;padding:16px 16px}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;font-size:14px;line-height:1.3;margin-bottom:8px;text-decoration:none;white-space:nowrap}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(32,122,183,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #207ab7;color:#207ab7}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto;max-height:650px;overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#207ab7;cursor:pointer;text-decoration:none}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content a:active{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content ul{display:block;list-style-type:disc;margin-bottom:16px;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.tox .tox-dialog__body-content .tox-form__group h1{color:#222f3e;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#222f3e;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:1px solid #ccc;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #ccc}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}.tox.tox-platform-ie .tox-dialog-wrap{position:-ms-device-fixed}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #ccc;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;-ms-flex-preferred-size:auto;overflow:hidden;position:relative}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;-ms-flex-preferred-size:auto;height:100%;position:absolute;width:100%}.tox.tox-inline-edit-area{border:1px dotted #ccc}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{z-index:1}.tox:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:none;transition:box-shadow .5s}.tox.tox-tinymce--toolbar-bottom .tox-editor-header,.tox.tox-tinymce-inline .tox-editor-header{margin-bottom:-1px}.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header{box-shadow:0 4px 4px -3px rgba(0,0,0,.25)}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34,47,62,.2);border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#207ab7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:3px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-textarea{flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#ccc;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 4.75px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{background-color:#fff;border-color:#207ab7;box-shadow:none;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#207ab7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#222f3e}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#ccc;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 4.75px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#207ab7;box-shadow:none;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea{-webkit-appearance:textarea;-moz-appearance:textarea;appearance:textarea;white-space:pre-wrap}.tox-fullscreen{border:0;height:100%;left:0;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;position:fixed;top:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox.tox-tinymce.tox-fullscreen{background-color:transparent;z-index:1200}.tox-shadowhost.tox-fullscreen{z-index:1200}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-image-tools{width:100%}.tox .tox-image-tools__toolbar{align-items:center;display:flex;justify-content:center}.tox .tox-image-tools__image{background-color:#666;height:380px;overflow:auto;position:relative;width:100%}.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top:8px}.tox .tox-image-tools__image-bg{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools__toolbar>.tox-spacer{flex:1;-ms-flex-preferred-size:auto}.tox .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left:8px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left:32px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right:8px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right:32px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#ccc;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px 0}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(32,122,183,.5);border-color:rgba(32,122,183,.5)}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:4px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:4px}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 10px 0 10px}.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar{border-top:1px solid #ccc}.tox .tox-mbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:transparent;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#dee0e2;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn--active{background:#c8cbcf;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#dee0e2;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:-ms-grid;display:grid;font-size:14px;font-weight:400;-ms-grid-columns:minmax(40px,1fr) auto minmax(40px,1fr);grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification a{text-decoration:underline}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#547831}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f8dede;border-color:#f2bfbf;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#c00}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fffaea;border-color:#ffe89d;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#222f3e}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d9edf7;border-color:#779ecb;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#222f3e}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{-ms-grid-row-align:center;align-self:center;color:#222f3e;font-size:14px;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-column:2;grid-column-start:2;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{-ms-grid-row-align:center;align-self:center;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{-ms-grid-row-align:start;align-self:start;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-column:3;grid-column-start:3;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification .tox-progress-bar{-ms-grid-column-span:3;grid-column-end:4;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:3;-ms-grid-row:2;grid-row-start:2;-ms-grid-column-align:center;justify-self:center}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar{flex-wrap:nowrap}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;position:absolute;width:0}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#ccc transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #ccc transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #ccc transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #ccc;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;-ms-flex-preferred-size:0;min-height:0}.tox .tox-sidebar{background-color:#fff;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;-ms-flex-preferred-size:auto;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #ccc;border-radius:3px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#207ab7;border:2px solid #185d8c;border-radius:3px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:nth-child(1){animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #ccc;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:12px;font-weight:400;height:18px;overflow:hidden;padding:0 8px;position:relative;text-transform:uppercase}.tox .tox-statusbar__text-container{display:flex;flex:1 1 auto;justify-content:flex-end;overflow:hidden}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){cursor:pointer;text-decoration:underline}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-8px;padding-left:1ch}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,.7)}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:1ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0;text-transform:none;width:34px}.tox .tox-tbtn svg{display:block;fill:#222f3e}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#dee0e2;border:0;box-shadow:none}.tox .tox-tbtn:hover{background:#dee0e2;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#c8cbcf;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:hover{background:#c8cbcf;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:51px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:68px;width:68px}.tox .tox-tbtn--return{-ms-grid-row-align:stretch;align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tbtn--select{margin:2px 0 3px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:2px 0 3px 0;overflow:hidden}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #dee0e2 inset}.tox .tox-split-button:focus{background:#dee0e2;box-shadow:none;color:#222f3e}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,.5)}.tox .tox-split-button .tox-tbtn{margin:0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:0 0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord .tox-toolbar__primary{border-top:1px solid #ccc;margin-top:-1px}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child{border-top:1px solid #ccc}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}.tox[dir=rtl] .tox-tbtn__icon-rtl svg{transform:rotateY(180deg)}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 10px 0 10px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid #ccc}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid #ccc}.tox .tox-tooltip{display:inline-block;padding:8px;position:relative}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:3px;box-shadow:0 2px 4px rgba(34,47,62,.3);color:rgba(255,255,255,.75);font-size:14px;font-style:normal;font-weight:400;padding:4px 8px;text-transform:none}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-well{border:1px solid #ccc;border-radius:3px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #ccc;border-radius:3px;display:flex;flex:1;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-image-tools-edit-panel{height:60px}.tox .tox-image-tools__sidebar{height:60px}.tox-menubar+.tox-toolbar,.tox-menubar+.tox-toolbar-overlord .tox-toolbar__primary{border-top:0 solid #ccc;margin-top:0}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:0 solid #ccc}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:0 solid #ccc}
+/*# sourceMappingURL=skin.min.css.map */
diff --git a/apps/web/src/components/deltatransformer/index.js b/apps/web/src/components/deltatransformer/index.js
deleted file mode 100644
index 01825e51e..000000000
--- a/apps/web/src/components/deltatransformer/index.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import Quill from "quill";
-
-const Delta = Quill.import("delta");
-
-class DeltaTransformer {
- highlightDifference(first, second, color) {
- const firstDelta = new Delta(first);
- const secondDelta = new Delta(second);
- const diff = secondDelta.diff(firstDelta);
- const colored = diff.map((op) => {
- if (op.insert) {
- if (!op.attributes) op.attributes = {};
- if (op.attributes.background) return op;
- op.attributes.diff = color;
- }
- return op;
- });
- return secondDelta.compose(new Delta(colored));
- }
-
- cleanDifference(delta) {
- return delta.ops.map((op) => {
- if (op.attributes && op.attributes.diff) {
- delete op.attributes.diff;
- }
- return op;
- });
- }
-}
-export default DeltaTransformer;
diff --git a/apps/web/src/components/editor/editor.css b/apps/web/src/components/editor/editor.css
index 5549cc1b9..8d75f68bc 100644
--- a/apps/web/src/components/editor/editor.css
+++ b/apps/web/src/components/editor/editor.css
@@ -1,251 +1,64 @@
-.ql-editor {
- height: auto !important;
- overflow: hidden !important;
+.tox .tox-tbtn:hover {
+ background: var(--shade) !important;
}
-.ql-container.ql-snow {
- border: none !important;
- overflow: hidden !important;
-}
-
-/*Quill Toolbar*/
-
-.ql-toolbar.ql-snow svg {
- height: 22px !important;
- width: 22px;
-}
-.ql-toolbar.ql-snow span {
- padding-top: 1px;
- font-size: 0.975em;
-}
-
-.ql-formats {
- margin-bottom: 5px;
-}
-
-.ql-formats > span.ql-color-picker {
- padding: 0px !important;
- height: auto !important;
- width: auto !important;
-}
-
-.ql-formats > span.ql-color-picker > .ql-picker-label {
- padding: 5px !important;
- padding-bottom: 0px !important;
- height: auto !important;
- width: auto !important;
- border-radius: 5px;
- margin-left: 2px;
- margin-right: 2px;
-}
-
-.ql-formats > span.ql-header,
-.ql-formats > span.ql-size {
- padding: 0px !important;
- height: auto !important;
-}
-
-.ql-formats > span.ql-header > .ql-picker-label,
-.ql-formats > span.ql-size > .ql-picker-label {
- padding: 5px !important;
- height: auto !important;
- border-radius: 5px;
- margin-left: 2px;
- margin-right: 2px;
-}
-
-.ql-formats > button {
- width: auto !important;
- height: auto !important;
- padding: 5px !important;
- border-radius: 5px;
- margin-left: 2px;
- margin-right: 2px;
-}
-
-.ql-header.ql-picker {
- width: 120px !important;
-}
-.ql-toolbar.ql-snow {
- width: 100%;
- border: none !important;
- border-bottom: 1px solid var(--border) !important;
- background-color: var(--background);
- padding: 5px !important;
- padding-left: 0px !important;
-}
-
-/*Color Overrides*/
-.ql-toolbar.ql-snow svg {
- fill: var(--text) !important;
-}
-
-.ql-snow.ql-toolbar button:hover,
-.ql-snow .ql-toolbar button:hover,
-.ql-snow.ql-toolbar button:focus,
-.ql-snow .ql-toolbar button:focus,
-.ql-snow.ql-toolbar button.ql-active,
-.ql-snow .ql-toolbar button.ql-active,
-.ql-snow.ql-toolbar .ql-picker-label:hover,
-.ql-snow .ql-toolbar .ql-picker-label:hover,
-.ql-snow.ql-toolbar .ql-picker-label.ql-active,
-.ql-snow .ql-toolbar .ql-picker-label.ql-active {
- color: var(--primary) !important;
- fill: var(--primary) !important;
- background-color: var(--shade) !important;
- transition: color 300ms linear;
-}
-
-.ql-snow.ql-toolbar button:hover svg,
-.ql-snow .ql-toolbar button:hover svg,
-.ql-snow.ql-toolbar button:focus svg,
-.ql-snow .ql-toolbar button:focus svg,
-.ql-snow.ql-toolbar button.ql-active svg,
-.ql-snow .ql-toolbar button.ql-active svg {
- fill: var(--primary) !important;
-}
-
-.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
-.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
-.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
-.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
-.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
-.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
-.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
-.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
-.ql-snow.ql-toolbar button:hover .ql-stroke-miter,
-.ql-snow .ql-toolbar button:hover .ql-stroke-miter,
-.ql-snow.ql-toolbar button:focus .ql-stroke-miter,
-.ql-snow .ql-toolbar button:focus .ql-stroke-miter,
-.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,
-.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,
-.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
-.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
-.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
-.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
-.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
-.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
-.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
-.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
- fill: var(--primary) !important;
-}
-
-.ql-snow.ql-toolbar button:hover .ql-fill,
-.ql-snow .ql-toolbar button:hover .ql-fill,
-.ql-snow.ql-toolbar button:focus .ql-fill,
-.ql-snow .ql-toolbar button:focus .ql-fill,
-.ql-snow.ql-toolbar button.ql-active .ql-fill,
-.ql-snow .ql-toolbar button.ql-active .ql-fill,
-.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
-.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,
-.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
-.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,
-.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
-.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,
-.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
-.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
-.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,
-.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,
-.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,
-.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,
-.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,
-.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,
-.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
-.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
-.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
-.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
-.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
-.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
-.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
-.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
- fill: var(--primary) !important;
-}
-
-.ql-snow.ql-toolbar :not(.ql-background).ql-picker .ql-picker-item:hover,
-.ql-snow.ql-toolbar
- :not(.ql-background).ql-picker
- .ql-picker-item.ql-selected:hover {
- background-color: var(--shade) !important;
- color: var(--text) !important;
-}
-
-.ql-snow.ql-toolbar :not(.ql-background).ql-picker .ql-picker-item.ql-selected {
- color: var(--primary) !important;
- background-color: var(--shade) !important;
-}
-
-.ql-snow.ql-toolbar .ql-picker-item {
- padding-left: 10px !important;
- padding-right: 10px !important;
-}
-
-.ql-snow .ql-picker {
+.tox-textfield {
+ border-radius: 5px !important;
+ border-color: var(--border) !important;
color: var(--text) !important;
+ padding: 10px !important;
+ font-size: 0.875rem !important;
+ line-height: 0.875rem !important;
}
-.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
- border: 0px !important;
- border-radius: 5px;
- background-color: var(--accent) !important;
- padding: 5px 0px !important;
+.tox-textfield:focus {
+ outline: none !important;
+ border-color: var(--primary) !important;
+ border-width: 2px !important;
}
-.ql-editor.ql-blank::before {
- color: var(--placeholder) !important;
- font-family: sans-serif;
+.tox-textfield:hover {
+ border-color: var(--dimPrimary) !important;
}
-.ql-editor .ql-syntax,
-code {
- font-family: monospace !important;
- font-size: 16px;
+.tox-button {
+ background-color: var(--primary) !important;
+ color: var(--static) !important;
+ transition: opacity 300ms linear;
+ border-width: 0px !important;
}
-.ql-editor .ql-syntax * {
- font-family: monospace !important;
- font-size: 16px;
+.tox-button:hover:not(.tox-button[disabled="disabled"]) {
+ opacity: 0.8;
}
-.ql-editor {
- font-size: 16px;
- line-height: 1.6 !important;
+.tox-button--secondary,
+.tox-button--icon {
+ background-color: var(--bgSecondary) !important;
color: var(--text) !important;
- padding: 10px 0px 10px 0px !important;
-}
-
-.ql-editor > p:not(:first-child) {
- margin-top: 20px;
-}
-
-.ql-editor.ql-blank::before {
- left: 0px !important;
- right: 0px !important;
}
-
-.ql-editor h1 h2 h3 h4 h5 h6 {
- font-family: sans-serif !important;
- font-weight: 700 !important;
-}
-
-.ql-editor code,
-pre > * {
- font-family: monospace !important;
+.tox-button[disabled="disabled"] {
+ background-color: var(--bgSecondary) !important;
+ color: var(--fontTertiary) !important;
}
-.ql-editor ul[data-checked="false"] > li::before,
-.ql-editor ul[data-checked="true"] > li::before {
- font-size: 20px;
+tox-tbtn tox-tbtn--select {
+ border-radius: 5px !important;
}
-.ql-editor ul[data-checked="true"] > li::before {
- color: var(--primary) !important;
+.tox-dialog {
+ border-radius: 5px !important;
+ border-width: 0px !important;
+ box-shadow: 4px 5px 18px 2px #00000038;
+ padding: 15px !important;
}
-.ql-editor ul[data-checked="true"] > li {
- text-decoration: line-through;
- text-decoration-color: var(--primary);
+.tox-dialog__footer {
+ border-top: 0px !important;
}
-.ql-editor code {
- background-color: var(--bgSecondary) !important;
+.tox-dialog__title {
+ color: var(--text) !important;
+ font-size: 1.2rem !important;
+ font-weight: bold !important;
}
diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.js
index de1816929..7e52315c1 100644
--- a/apps/web/src/components/editor/index.js
+++ b/apps/web/src/components/editor/index.js
@@ -1,29 +1,24 @@
import React, { useEffect, useMemo, useRef, Suspense } from "react";
-import { Box, Flex } from "rebass";
+import { Flex } from "rebass";
import Properties from "../properties";
import {
useStore,
SESSION_STATES,
store as editorstore,
} from "../../stores/editor-store";
-import * as Icon from "../icons";
import { useStore as useAppStore } from "../../stores/app-store";
-import { useStore as useUserStore } from "../../stores/user-store";
import Animated from "../animated";
import Header from "./header";
import useMobile from "../../utils/use-mobile";
import useTablet from "../../utils/use-tablet";
-import { SUBSCRIPTION_STATUS } from "../../common";
import Toolbar from "./toolbar";
-import ObservableArray from "../../utils/observablearray";
import Banner from "../banner";
import EditorLoading from "./loading";
-import { useTheme } from "emotion-theming";
-const ReactQuill = React.lazy(() => import("./react-quill"));
+const ReactMCE = React.lazy(() => import("./tinymce"));
function Editor(props) {
- const theme = useTheme();
+ const editorRef = useRef();
const sessionState = useStore((store) => store.session.state);
const sessionId = useStore((store) => store.session.id);
const contentType = useStore((store) => store.session.content?.type);
@@ -35,78 +30,42 @@ function Editor(props) {
const isFocusMode = useAppStore((store) => store.isFocusMode);
const isMobile = useMobile();
const isTablet = useTablet();
- const isTrial = useUserStore(
- (store) => store.user?.subscription?.status === SUBSCRIPTION_STATUS.TRIAL
- );
- const isLoggedin = useUserStore((store) => store.isLoggedIn);
const editorMargins = useMemo(() => {
if (isMobile || isTablet) return "0%";
else return "10px";
}, [isTablet, isMobile]);
- const quillRef = useRef();
-
useEffect(() => {
init();
}, [init]);
useEffect(() => {
- if (contentType !== "delta" || !quillRef || !quillRef.current) return;
-
if (sessionState === SESSION_STATES.new) {
editorstore.set((state) => (state.session.state = SESSION_STATES.stale));
const {
content: { data },
} = editorstore.get().session;
+ const editor = editorRef.current?.editor;
+ if (!editor) return;
+ function setContents() {
+ if (editor.initialized) {
+ editor.undoManager.clear();
+ editor.undoManager.add();
+ editor.setDirty(false);
- const { quill } = quillRef.current;
- const pages = opsToPages(data);
- quillRef.current.init(pages, data);
-
- const editorScroll = document.querySelector(".editorScroll");
- while (
- editorScroll.scrollHeight <= editorScroll.clientHeight &&
- quillRef.current.currentPage < pages.length
- ) {
- const page = pages[++quillRef.current.currentPage];
- if (!page) break;
- quill.updateContents(getNextPage(page, quillRef.current.quill), "init");
- }
-
- quill.history.stack = {
- undo: new ObservableArray("undo"),
- redo: new ObservableArray("redo"),
- };
-
- const record = quill.history.record.bind(quill.history);
- quill.history.record = function (changeDelta, oldDelta) {
- record(changeDelta, oldDelta);
- quill.history.stack.redo = new ObservableArray("redo");
- };
-
- function onScroll(e) {
- const scrollBottom = e.target.scrollTop + e.target.clientHeight + 10;
- const maxScrollHeight = e.target.scrollHeight - 80;
- if (scrollBottom > maxScrollHeight) {
- const page = pages[++quillRef.current.currentPage];
- if (!page) {
- --quillRef.current.currentPage;
- editorScroll.removeEventListener("scroll", onScroll);
- return;
- }
- quill.updateContents(
- getNextPage(page, quillRef.current.quill),
- "init"
- );
+ // NOTE: workaround to not fire onEditorChange event on content load
+ editor.isLoading = true;
+ editor.setContent(data, { format: "html" });
}
}
- editorScroll.addEventListener("scroll", onScroll);
+ setContents();
+ editor.on("init", setContents);
return () => {
- editorScroll.removeEventListener("scroll", onScroll);
+ editor.off("init", setContents);
};
}
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, [quillRef, contentType, sessionId]);
+ }, [editorRef, contentType, sessionId]);
return (
<Flex
@@ -119,7 +78,7 @@ function Editor(props) {
flex="1 1 auto"
>
{isMobile && <Banner />}
- <Toolbar quill={quillRef.current?.quill} />
+ <Toolbar />
<Flex
variant="columnFill"
className="editorScroll"
@@ -143,135 +102,27 @@ function Editor(props) {
mt={[0, 0, 25]}
>
<Header />
- <Box
- id="toolbarContainer"
- bg="background"
- alignSelf="center"
- sx={{
- borderBottom: "1px solid",
- borderBottomColor: "border",
- position: "sticky",
- top: 0,
- zIndex: 2,
- maxHeight: 45,
- overflow: "hidden",
- transition: "max-height 500ms linear",
- }}
- >
- <Icon.ChevronDown
- id="editorToolbarExpand"
- sx={{
- display: ["none", "none", "block"],
- position: "absolute",
- right: 0,
- top: 10,
- cursor: "pointer",
- height: 28,
- borderRadius: "default",
- ":hover": { bg: "dimPrimary" },
- }}
- title="Expand"
- size={28}
- onClick={(e) => {
- const toolbarContainer = document.getElementById(
- "toolbarContainer"
- );
- const toolbarExpandButton = document.getElementById(
- "editorToolbarExpand"
- );
- const quill = document.getElementById("quill");
- if (toolbarContainer) {
- const toolbar = toolbarContainer.lastElementChild;
- if (
- !toolbarContainer.style.overflow ||
- toolbarContainer.style.overflow === "hidden"
- ) {
- toolbarContainer.style.overflow = "visible";
- toolbarExpandButton.style["background-color"] =
- theme.colors.shade;
- quill.style.paddingTop = `${
- toolbar.clientHeight - toolbarContainer.clientHeight
- }px`;
- } else {
- toolbarContainer.style.overflow = "hidden";
- toolbarExpandButton.style["background-color"] =
- "transparent";
- quill.style.paddingTop = `0px`;
- }
- }
- }}
- />
- </Box>
- {contentType === "delta" && (
- <Suspense fallback={<EditorLoading />}>
- <ReactQuill
- id="quill"
- ref={quillRef}
- refresh={sessionState === SESSION_STATES.new}
- isSimple={!isLoggedin || (isLoggedin && !isTrial)}
- isFocusMode={isFocusMode}
- onFocus={() => {
- toggleProperties(false);
- }}
- placeholder="Start writing your note here..."
- container=".editor"
- scrollContainer=".editorScroll"
- onSave={() => {
- saveSession();
- }}
- onSelectAll={(quill) => {
- const { pages, currentPage } = quillRef.current;
- const percentageLoaded =
- ((currentPage + 1) / pages.length) * 100;
- if (percentageLoaded < 70) {
- if (
- window.confirm(
- "This seems to be a large document. It might take a little time to load and select all of it."
- )
- ) {
- const delta = quill.getContents().ops;
- quillRef.current.currentPage = pages.length;
- const fullContent = appendPages(
- delta,
- pages,
- currentPage
- );
- quill.setContents(fullContent, "init");
- } else return;
- }
- quill.setSelection(0, quill.getLength(), "user");
- quill.scrollIntoView();
- }}
- initialContent={[{ insert: "\n" }]}
- changeInterval={500}
- onWordCountChanged={updateWordCount}
- onQuillInitialized={() => {
- const toolbar = document.querySelector(".ql-toolbar.ql-snow");
- const toolbarContainer = document.querySelector(
- "#toolbarContainer"
- );
- if (toolbar && toolbarContainer) {
- toolbar.style.opacity = 1;
- toolbarContainer.appendChild(toolbar);
- }
- }}
- onChange={() => {
- const { quill } = quillRef.current;
- const delta = quill.getContents().ops;
+ <Suspense fallback={<EditorLoading />}>
+ {contentType === "tiny" ? (
+ <ReactMCE
+ editorRef={editorRef}
+ onFocus={() => toggleProperties(false)}
+ onSave={saveSession}
+ onChange={(content) => {
+ console.log("CHANGING CONTENT", content);
+ if (!content.length) content = "<p><br></pr>";
setSession((state) => {
state.session.content = {
- type: "delta",
- data: appendPages(
- delta,
- quillRef.current.pages,
- quillRef.current.currentPage
- ),
+ type: "tiny",
+ data: content,
};
});
}}
+ changeInterval={500}
+ onWordCountChanged={updateWordCount}
/>
- </Suspense>
- )}
+ ) : null}
+ </Suspense>
</Animated.Flex>
</Flex>
<Properties />
@@ -279,28 +130,3 @@ function Editor(props) {
);
}
export default Editor;
-
-function opsToPages(delta, pageSize = 20) {
- const totalPages = delta.length / pageSize;
- const pages = [];
- for (var i = 0; i < totalPages; ++i) {
- const start = i * pageSize;
- const end = start + pageSize;
- pages.push(delta.slice(start, end));
- }
- return pages;
-}
-
-function getNextPage(page, quill) {
- const length = quill.getLength();
- page.splice(0, 0, { retain: length - 1 });
- return page;
-}
-
-function appendPages(delta, pages, currentPage) {
- if (pages.length === currentPage + 1) return delta;
- for (var i = currentPage; i < pages.length; ++i) {
- delta.push(...pages[i]);
- }
- return delta;
-}
diff --git a/apps/web/src/components/editor/modules/betterlist/index.js b/apps/web/src/components/editor/modules/betterlist/index.js
deleted file mode 100644
index c9a55eb01..000000000
--- a/apps/web/src/components/editor/modules/betterlist/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import Quill from "quill";
-
-const List = Quill.import("formats/list");
-
-class BetterList extends List {
- constructor(_scroll, el) {
- super(_scroll, el);
-
- const isCheckList = el.hasAttribute("data-checked");
- el.addEventListener("touchstart", (e) => {
- if (!isCheckList) {
- return;
- }
- e.preventDefault();
- });
- }
-}
-
-Quill.register("formats/lists", BetterList);
diff --git a/apps/web/src/components/editor/modules/focus/focus.css b/apps/web/src/components/editor/modules/focus/focus.css
deleted file mode 100644
index dd6628349..000000000
--- a/apps/web/src/components/editor/modules/focus/focus.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.quill-focus .ql-editor * {
- transition: opacity 300ms;
-}
-
-.quill-focus .ql-editor > :not(.focused-blot) {
- opacity: 0.7;
-}
-
-.quill-focus .focused-blot {
- opacity: 1;
-}
diff --git a/apps/web/src/components/editor/modules/focus/index.js b/apps/web/src/components/editor/modules/focus/index.js
deleted file mode 100644
index eeb7c7f53..000000000
--- a/apps/web/src/components/editor/modules/focus/index.js
+++ /dev/null
@@ -1,67 +0,0 @@
-import "./focus.css";
-
-class Focus {
- constructor(quill, options) {
- this.quill = quill;
- this.options = options;
- this.container = quill.container;
- this.focusClass = options.focusClass || "focused-blot";
- if (options.enabled) {
- this.toggle(true);
- }
- }
-
- onSelectionChanged = (range) => {
- this.highlightBlot(range);
- };
-
- onTextChanged = () => {
- const selection = this.quill.getSelection();
- this.highlightBlot(selection);
- };
-
- toggle(enabled) {
- if (enabled) {
- this.quill.container.classList.add("quill-focus");
- this.removeHighlighting();
- this.quill.on("selection-change", this.onSelectionChanged);
- this.quill.on("text-change", this.onTextChanged);
- } else {
- this.removeHighlighting();
- this.quill.container.classList.remove("quill-focus");
- this.quill.off("selection-change", this.onSelectionChanged);
- this.quill.off("text-change", this.onTextChanged);
- }
- }
-
- removeHighlighting = () => {
- this.container.querySelectorAll("." + this.focusClass).forEach((blot) => {
- if (blot && blot.classList) {
- blot.classList.remove(this.focusClass);
- }
- });
- };
-
- highlightBlot = (range) => {
- this.removeHighlighting();
- if (range && range.index !== undefined) {
- var [line] = this.quill.getLine(range.index);
- if (line && line.domNode) {
- line.domNode.classList.add(this.focusClass);
- this.recursiveWalkUpward(line.domNode, (parent) => {
- parent.classList.add(this.focusClass);
- });
- }
- }
- };
-
- recursiveWalkUpward(domNode, cb) {
- var parent = domNode.parentNode;
- while (!parent.classList.contains("ql-editor")) {
- cb(parent);
- parent = parent.parentNode;
- }
- }
-}
-
-export default Focus;
diff --git a/apps/web/src/components/editor/modules/markdown/hr.js b/apps/web/src/components/editor/modules/markdown/hr.js
deleted file mode 100644
index ba45de2d0..000000000
--- a/apps/web/src/components/editor/modules/markdown/hr.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import Quill from "quill";
-
-let BlockEmbed = Quill.import("blots/block/embed");
-
-class HorizontalRule extends BlockEmbed {}
-HorizontalRule.blotName = "hr";
-HorizontalRule.tagName = "hr";
-
-export default HorizontalRule;
diff --git a/apps/web/src/components/editor/modules/markdown/index.js b/apps/web/src/components/editor/modules/markdown/index.js
deleted file mode 100644
index d191a582d..000000000
--- a/apps/web/src/components/editor/modules/markdown/index.js
+++ /dev/null
@@ -1,343 +0,0 @@
-// Quill.js Plugin - Markdown Shortcuts
-// This is a module for the Quill.js WYSIWYG editor (https://quilljs.com/)
-// which converts text entered as markdown to rich text.
-//
-// v0.0.5
-//
-// Author: Patrick Lee ([email protected])
-//
-// (c) Copyright 2017 Patrick Lee ([email protected]).
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-import Quill from "quill";
-import HorizontalRule from "./hr";
-
-const Block = Quill.import("blots/block");
-Quill.register("formats/horizontal", HorizontalRule);
-
-function matchInline(text, pattern, lineStart, commit) {
- if (text.match(/^([*_ \n]+)$/g)) return false;
-
- let match = pattern.exec(text);
-
- const annotatedText = match[0];
- const matchedText = match[2];
- match.index = match.index && commit ? match.index + 1 : match.index;
- const startIndex = lineStart + match.index;
-
- return { annotatedText, matchedText, startIndex };
-}
-class MarkdownShortcuts {
- _makeHeaderAction(headerSize) {
- return (text, selection, _pattern, lineStart) => {
- const [prevLine] = this.quill.getLine(lineStart - 1);
- const prevLineStart =
- selection.index - text.length - prevLine.cache.length;
- const prevLineText = this.quill.getText(
- prevLineStart,
- prevLine.cache.length
- );
- if (prevLineText.trim().length <= 0) return false;
- setTimeout(() => {
- this.quill.formatLine(prevLineStart, 0, "header", headerSize);
- this.quill.deleteText(lineStart, text.length);
- }, 0);
- };
- }
- _makeInlineAction(inlineStyle) {
- return (text, _selection, pattern, lineStart, commit, trigger) => {
- const matchInfo = matchInline(text, pattern, lineStart, commit);
- if (!matchInfo) return;
- const { matchedText, annotatedText, startIndex } = matchInfo;
-
- setTimeout(() => {
- this.quill.deleteText(startIndex, annotatedText.trim().length);
- this.quill.insertText(startIndex, matchedText, inlineStyle);
- }, 0);
- };
- }
- _makeEmphasisMatcher(name, numberOfChars, inlineStyle) {
- return {
- name,
- pattern: new RegExp(
- `(?:^|\\s|\\n|[^A-z0-9_*~\`])(\\*{${numberOfChars}}|_{${numberOfChars}})((?!\\1).*?)(\\1)($|\\s|\\n|[^A-z0-9_*~\`])`,
- "g"
- ),
- action: this._makeInlineAction(inlineStyle),
- };
- }
-
- constructor(quill, options) {
- this.quill = quill;
- this.options = options;
-
- this.ignoreTags = ["PRE"];
- this.matches = [
- this._makeEmphasisMatcher("bolditalic", 3, { bold: true, italic: true }),
- this._makeEmphasisMatcher("bold", 2, { bold: true }),
- this._makeEmphasisMatcher("italic", 1, { italic: true }),
- {
- name: "header",
- pattern: /^(#){1,6}\s/g,
- action: (text, selection, pattern) => {
- var match = pattern.exec(text);
- if (!match) return;
- const size = match[0].length;
- // Need to defer this action https://github.com/quilljs/quill/issues/1134
- setTimeout(() => {
- this.quill.formatLine(selection.index, 0, "header", size - 1);
- this.quill.deleteText(selection.index - size, size);
- }, 0);
- },
- },
- {
- name: "subtext-header-1",
- pattern: /^=+$/g,
- action: this._makeHeaderAction(1),
- },
- {
- name: "subtext-header-2",
- pattern: /^-+$/g,
- action: this._makeHeaderAction(2),
- },
- {
- name: "blockquote",
- pattern: /^(>)\s/g,
- action: (text, selection) => {
- // Need to defer this action https://github.com/quilljs/quill/issues/1134
- setTimeout(() => {
- this.quill.formatLine(selection.index, 1, "blockquote", true);
- this.quill.deleteText(selection.index - 2, 2);
- }, 0);
- },
- },
- {
- name: "code-block",
- pattern: /^`{3}(\s+|)$/g,
- action: (text, selection, _pattern, lineStart, commit, trigger) => {
- if (!commit) return;
- // Need to defer this action https://github.com/quilljs/quill/issues/1134
- setTimeout(() => {
- this.quill.formatLine(selection.index, 1, "code-block", true);
- let deleteCount = trigger === " " ? 4 : 3;
- this.quill.deleteText(selection.index - deleteCount, deleteCount);
- this.quill.setSelection(selection.index - deleteCount);
- }, 0);
- },
- },
- {
- name: "strikethrough",
- pattern: /(?:^|\s|\n|[^A-z0-9_*~`])(~{2})((?!\1).*?)(\1)($|\s|\n|[^A-z0-9_*~`])/g,
- action: this._makeInlineAction({ strike: true }),
- },
- // {
- // name: "displayformula",
- // pattern: /(?:\$\$)(.+?)(?:\$\$)/g,
- // action: (text, selection, pattern, lineStart) => {
- // let match = pattern.exec(text);
-
- // const annotatedText = match[0];
- // const matchedText = match[1];
- // const startIndex = lineStart + match.index;
-
- // if (text.match(/^([*_ \n]+)$/g)) return;
-
- // setTimeout(() => {
- // this.quill.deleteText(startIndex, annotatedText.length);
- // this.quill.insertEmbed(startIndex, "formula", matchedText);
- // this.quill.insertText(startIndex + 1, "\n", "align", "center");
- // }, 0);
- // },
- // },
- // {
- // name: "formula",
- // pattern: /(?:\$)(.+?)(?:\$)/g,
- // action: (text, selection, pattern, lineStart) => {
- // let match = pattern.exec(text);
-
- // const annotatedText = match[0];
- // const matchedText = match[1];
- // const startIndex = lineStart + match.index;
-
- // if (text.match(/^([*_ \n]+)$/g)) return;
-
- // setTimeout(() => {
- // this.quill.deleteText(startIndex, annotatedText.length);
- // this.quill.insertEmbed(startIndex, "formula", matchedText);
- // }, 0);
- // },
- // },
- {
- name: "code",
- pattern: /(?:^|\s|\n|[^A-z0-9_*~`])(`)((?!\1).*?)(\1)($|\s|\n|[^A-z0-9_*~`])/g,
- action: this._makeInlineAction({
- code: true,
- }),
- },
- {
- name: "hr",
- pattern: /^(-|\*){3}/g,
- action: (text, selection, pattern) => {
- setTimeout(() => {
- const matchedText = text.match(pattern)[0];
- const startIndex = selection.index - matchedText.length;
- this.quill.deleteText(startIndex, matchedText.length);
-
- this.quill.insertEmbed(startIndex, "hr", true, Quill.sources.USER);
- this.quill.setSelection(startIndex + 1, Quill.sources.SILENT);
- }, 0);
- },
- },
- {
- name: "plus-ul",
- // Quill 1.3.5 already treat * as another trigger for bullet lists
- pattern: /^\+\s$/g,
- action: (text, selection, pattern) => {
- setTimeout(() => {
- this.quill.formatLine(selection.index, 1, "list", "unordered");
- this.quill.deleteText(selection.index - 2, 2);
- }, 0);
- },
- },
- {
- name: "image",
- pattern: /!\[([^\]]*)]\(([^)"]+)(?: "([^"]+)")?\)/g,
- action: (text, selection, pattern, _lineStart, commit, trigger) => {
- if (!commit) return;
- const [matchedText, , link] = pattern.exec(text);
- const start =
- selection.index - matchedText.length - (trigger === " " ? 1 : 0);
- setTimeout(() => {
- this.quill.deleteText(start, matchedText.length);
- this.quill.insertEmbed(start, "image", link);
- }, 0);
- },
- },
- {
- name: "link",
- pattern: /\[([^\]]+)]\(([^)"]+)(?: "([^"]+)")?\)/g,
- action: (text, selection, pattern, _lineStart, commit, trigger) => {
- if (!commit) return;
- const [matchedText, title, link] = pattern.exec(text);
- const start =
- selection.index - matchedText.length - (trigger === " " ? 1 : 0);
- setTimeout(() => {
- this.quill.deleteText(start, matchedText.length);
- this.quill.insertText(start, title, "link", link);
- }, 0);
- },
- },
- ];
-
- // Handler that looks for insert deltas that match specific characters
- this.quill.on("text-change", (delta, oldContents, source) => {
- if (source !== "user") return;
- for (let i = 0; i < delta.ops.length; i++) {
- if (delta.ops[i].hasOwnProperty("insert")) {
- let char = delta.ops[i].insert;
- if (char === " " || char === "\n") {
- this.onSpace(char, true);
- } //else this.onSpace("", false);
- } else if (delta.ops[i].hasOwnProperty("delete") && source === "user") {
- this.onDelete();
- }
- }
- });
- }
-
- isValid(text, tagName) {
- return (
- typeof text !== "undefined" &&
- text &&
- this.ignoreTags.indexOf(tagName) === -1
- );
- }
-
- onSpace(trigger, commit) {
- const selection = this.quill.getSelection();
- if (!selection) return;
- const [line, offset] = this.quill.getLine(selection.index);
- const lineStart = selection.index - offset;
- //const rawText = this.quill.getText(lineStart, selection.index - lineStart);
-
- // formulas count as a single character for insertion/deletion
- // purposes, yet they don't show up the output of getText.
- // So we have to compensate:
- // see https://github.com/quilljs/quill/blob/cb0fb6630a59aa8efff3e0d1caa6645e565d19bd/core/editor.js#L147
- // for the implementation of getText, which is what we were using before here
- const text = this.quill
- .getContents(lineStart, selection.index)
- .filter((op) => typeof op.insert === "string" /* || op.insert.formula*/)
- .map((op) => op.insert /*(op.insert.formula ? " " : op.insert) */)
- .join("");
-
- if (this.isValid(text, line.domNode.tagName)) {
- for (let match of this.matches) {
- const matchedText = text.match(match.pattern);
- if (matchedText) {
- // We need to replace only matched text not the whole line
- if (
- match.action(
- text,
- selection,
- match.pattern,
- lineStart,
- commit,
- trigger
- ) !== false
- ) {
- this.lastMatch = match;
- console.log("Quill match made (" + match.name + ")");
- return;
- }
- }
- }
- }
- }
-
- onDelete() {
- const range = this.quill.getSelection();
- const format = this.quill.getFormat(range);
-
- if (format.blockquote || format.code || format["code-block"]) {
- if (this.isLastBrElement(range) || this.isEmptyLine(range)) {
- this.quill.removeFormat(range.index, range.length);
- }
- }
- }
-
- isLastBrElement(range) {
- const [block] = this.quill.scroll.descendant(Block, range.index);
- const isBrElement =
- block != null && block.domNode.firstChild instanceof HTMLBRElement;
- return isBrElement;
- }
-
- isEmptyLine(range) {
- const [line] = this.quill.getLine(range.index);
- const isEmpty = line?.children?.head?.text?.trim() === "";
- return isEmpty;
- }
-}
-
-if (window.Quill) {
- window.Quill.register("modules/markdownShortcuts", MarkdownShortcuts);
-}
-
-export default MarkdownShortcuts;
diff --git a/apps/web/src/components/editor/plugins/code/index.js b/apps/web/src/components/editor/plugins/code/index.js
new file mode 100644
index 000000000..dfd8f6603
--- /dev/null
+++ b/apps/web/src/components/editor/plugins/code/index.js
@@ -0,0 +1 @@
+import "./plugin";
diff --git a/apps/web/src/components/editor/plugins/code/plugin.js b/apps/web/src/components/editor/plugins/code/plugin.js
new file mode 100644
index 000000000..8f4b70873
--- /dev/null
+++ b/apps/web/src/components/editor/plugins/code/plugin.js
@@ -0,0 +1,84 @@
+import tinymce from "tinymce/tinymce";
+
+(function () {
+ var global = tinymce.util.Tools.resolve("tinymce.PluginManager");
+
+ var replaceContent = function (editor, content) {
+ let node = editor.selection.getNode();
+ editor.undoManager.transact(function () {
+ node.remove();
+ editor.execCommand("mceInsertContent", false, content(node));
+ });
+ node = editor.selection.getNode();
+ editor.focus();
+ editor.selection.setCursorLocation(node);
+ editor.nodeChanged();
+ };
+
+ var addCodeBlock = function (editor, api) {
+ if (api.isActive()) {
+ replaceContent(
+ editor,
+ (node) => `<p>${node.innerHTML.replace(/\n/gm, "<br>")}</p>`
+ );
+ } else {
+ var content = editor.selection.getContent({ format: "text" });
+ content = content.replace(/^\n/gm, "");
+ if (content.length > 0) {
+ editor.undoManager.transact(function () {
+ editor.execCommand(
+ "mceInsertContent",
+ false,
+ `<pre>${content}</pre>`
+ );
+ });
+ editor.selection.setCursorLocation();
+ editor.nodeChanged();
+ } else {
+ replaceContent(
+ editor,
+ (node) => `<pre>${node.innerHTML.replace(/\n/gm, "<br>")}</pre>`
+ );
+ }
+ }
+ };
+
+ var register = function (editor) {
+ editor.addCommand("mceCode", function (api) {
+ addCodeBlock(editor, api);
+ });
+ };
+
+ var register$1 = function (editor) {
+ editor.ui.registry.addToggleButton("code", {
+ icon: "sourcecode",
+ tooltip: "Code",
+ onAction: function (api) {
+ return addCodeBlock(editor, api);
+ },
+ onSetup: getNodeChangeHandler(editor),
+ });
+ };
+
+ var getNodeChangeHandler = function (editor) {
+ return function (api) {
+ var nodeChangeHandler = function (e) {
+ api.setActive(e.element.tagName === "PRE");
+ };
+ editor.on("NodeChange", nodeChangeHandler);
+ return function () {
+ return editor.off("NodeChange", nodeChangeHandler);
+ };
+ };
+ };
+
+ function Plugin() {
+ global.add("code", function (editor) {
+ register(editor);
+ register$1(editor);
+ return {};
+ });
+ }
+
+ Plugin();
+})();
diff --git a/apps/web/src/components/editor/plugins/quickimage/index.js b/apps/web/src/components/editor/plugins/quickimage/index.js
new file mode 100644
index 000000000..dfd8f6603
--- /dev/null
+++ b/apps/web/src/components/editor/plugins/quickimage/index.js
@@ -0,0 +1 @@
+import "./plugin";
diff --git a/apps/web/src/components/editor/plugins/quickimage/plugin.js b/apps/web/src/components/editor/plugins/quickimage/plugin.js
new file mode 100644
index 000000000..67e5427a4
--- /dev/null
+++ b/apps/web/src/components/editor/plugins/quickimage/plugin.js
@@ -0,0 +1,74 @@
+import tinymce from "tinymce/tinymce";
+
+(function () {
+ tinymce.PluginManager.add("quickimage", function (editor, url) {
+ /**
+ * Plugin behaviour for when the Toolbar or Menu item is selected
+ *
+ * @private
+ */
+ function _onAction() {
+ var input = document.createElement("input");
+ input.setAttribute("type", "file");
+ input.setAttribute("accept", "image/*");
+ input.onchange = function () {
+ var file = this.files[0];
+ if (!file) return null;
+ var reader = new FileReader();
+ reader.onload = function (e) {
+ console.log(e, reader);
+ minifyImg(
+ reader.result,
+ 600,
+ (r) => {
+ console.log(r);
+ var content = `<img src="${r}">`;
+ editor.insertContent(content);
+ reader.onerror = null;
+ },
+ 1
+ );
+
+ reader.onerror = function () {
+ reader.onerror = null;
+ };
+ };
+ reader.readAsDataURL(file);
+ };
+ input.dispatchEvent(new MouseEvent("click"));
+ }
+
+ editor.ui.registry.addButton("image", {
+ icon: "image",
+ tooltip: "Insert image",
+ onAction: _onAction,
+ });
+
+ var minifyImg = function (dataUrl, newWidth, resolve, quality) {
+ var image, oldWidth, oldHeight, newHeight, canvas, ctx, newDataUrl;
+ new Promise(function (resolve) {
+ image = new Image();
+ image.src = dataUrl;
+ resolve();
+ }).then(() => {
+ oldWidth = image.width;
+ oldHeight = image.height;
+
+ newHeight = Math.floor((oldHeight / oldWidth) * newWidth);
+
+ canvas = document.createElement("canvas");
+ canvas.width = newWidth;
+ canvas.height = newHeight;
+
+ ctx = canvas.getContext("2d");
+ ctx.drawImage(image, 0, 0, newWidth, newHeight);
+ newDataUrl = canvas.toDataURL(undefined, quality);
+ resolve(newDataUrl);
+ });
+ };
+
+ editor.addCommand("InsertImage", function (ui, value) {
+ _onAction();
+ });
+ });
+})();
diff --git a/apps/web/src/components/editor/plugins/shortlink/index.js b/apps/web/src/components/editor/plugins/shortlink/index.js
new file mode 100644
index 000000000..9450f4277
--- /dev/null
+++ b/apps/web/src/components/editor/plugins/shortlink/index.js
@@ -0,0 +1 @@
+import "./plugin"
\ No newline at end of file
diff --git a/apps/web/src/components/editor/plugins/shortlink/plugin.js b/apps/web/src/components/editor/plugins/shortlink/plugin.js
new file mode 100644
index 000000000..109180bd2
--- /dev/null
+++ b/apps/web/src/components/editor/plugins/shortlink/plugin.js
@@ -0,0 +1,725 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.6.2 (2020-12-08)
+ */
+import tinymce from "tinymce/tinymce";
+
+(function () {
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+ var typeOf = function (x) {
+ var t = typeof x;
+ if (x === null) {
+ return 'null';
+ // eslint-disable-next-line no-mixed-operators
+ } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+ return 'array';
+ // eslint-disable-next-line no-mixed-operators
+ } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+ return 'string';
+ } else {
+ return t;
+ }
+ };
+ var isType = function (type) {
+ return function (value) {
+ return typeOf(value) === type;
+ };
+ };
+ var isSimpleType = function (type) {
+ return function (value) {
+ return typeof value === type;
+ };
+ };
+ var eq = function (t) {
+ return function (a) {
+ return t === a;
+ };
+ };
+ var isString = isType('string');
+ var isNull = eq(null);
+ var isBoolean = isSimpleType('boolean');
+
+ var assumeExternalTargets = function (editor) {
+ var externalTargets = editor.getParam('link_assume_external_targets', false);
+ if (isBoolean(externalTargets) && externalTargets) {
+ return 1;
+ } else if (isString(externalTargets) && (externalTargets === 'http' || externalTargets === 'https')) {
+ return externalTargets;
+ }
+ return 0;
+ };
+ var hasContextToolbar = function (editor) {
+ return editor.getParam('link_context_toolbar', false, 'boolean');
+ };
+ var getDefaultLinkTarget = function (editor) {
+ return editor.getParam('default_link_target');
+ };
+ var allowUnsafeLinkTarget = function (editor) {
+ return editor.getParam('allow_unsafe_link_target', false, 'boolean');
+ };
+
+ var appendClickRemove = function (link, evt) {
+ document.body.appendChild(link);
+ link.dispatchEvent(evt);
+ document.body.removeChild(link);
+ };
+ var open = function (url) {
+ var link = document.createElement('a');
+ link.target = '_blank';
+ link.href = url;
+ link.rel = 'noreferrer noopener';
+ var evt = document.createEvent('MouseEvents');
+ evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ appendClickRemove(link, evt);
+ };
+
+ var __assign = function () {
+ __assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+
+ var noop = function () {
+ };
+ var constant = function (value) {
+ return function () {
+ return value;
+ };
+ };
+ var never = constant(false);
+ var always = constant(true);
+
+ var none = function () {
+ return NONE;
+ };
+ var NONE = function () {
+ var eq = function (o) {
+ return o.isNone();
+ };
+ var call = function (thunk) {
+ return thunk();
+ };
+ var id = function (n) {
+ return n;
+ };
+ var me = {
+ fold: function (n, _s) {
+ return n();
+ },
+ is: never,
+ isSome: never,
+ isNone: always,
+ getOr: id,
+ getOrThunk: call,
+ getOrDie: function (msg) {
+ throw new Error(msg || 'error: getOrDie called on none.');
+ },
+ getOrNull: constant(null),
+ getOrUndefined: constant(undefined),
+ or: id,
+ orThunk: call,
+ map: none,
+ each: noop,
+ bind: none,
+ exists: never,
+ forall: always,
+ filter: none,
+ equals: eq,
+ equals_: eq,
+ toArray: function () {
+ return [];
+ },
+ toString: constant('none()')
+ };
+ return me;
+ }();
+ var some = function (a) {
+ var constant_a = constant(a);
+ var self = function () {
+ return me;
+ };
+ var bind = function (f) {
+ return f(a);
+ };
+ var me = {
+ fold: function (n, s) {
+ return s(a);
+ },
+ is: function (v) {
+ return a === v;
+ },
+ isSome: always,
+ isNone: never,
+ getOr: constant_a,
+ getOrThunk: constant_a,
+ getOrDie: constant_a,
+ getOrNull: constant_a,
+ getOrUndefined: constant_a,
+ or: self,
+ orThunk: self,
+ map: function (f) {
+ return some(f(a));
+ },
+ each: function (f) {
+ f(a);
+ },
+ bind: bind,
+ exists: bind,
+ forall: bind,
+ filter: function (f) {
+ return f(a) ? me : NONE;
+ },
+ toArray: function () {
+ return [a];
+ },
+ toString: function () {
+ return 'some(' + a + ')';
+ },
+ equals: function (o) {
+ return o.is(a);
+ },
+ equals_: function (o, elementEq) {
+ return o.fold(never, function (b) {
+ return elementEq(a, b);
+ });
+ }
+ };
+ return me;
+ };
+ var from = function (value) {
+ return value === null || value === undefined ? NONE : some(value);
+ };
+ var Optional = {
+ some: some,
+ none: none,
+ from: from
+ };
+
+ var each = function (xs, f) {
+ for (var i = 0, len = xs.length; i < len; i++) {
+ var x = xs[i];
+ f(x, i);
+ }
+ };
+ var foldl = function (xs, f, acc) {
+ each(xs, function (x) {
+ acc = f(acc, x);
+ });
+ return acc;
+ };
+
+ var keys = Object.keys;
+ var hasOwnProperty = Object.hasOwnProperty;
+ var each$1 = function (obj, f) {
+ var props = keys(obj);
+ for (var k = 0, len = props.length; k < len; k++) {
+ var i = props[k];
+ var x = obj[i];
+ f(x, i);
+ }
+ };
+ var objAcc = function (r) {
+ return function (x, i) {
+ r[i] = x;
+ };
+ };
+ var internalFilter = function (obj, pred, onTrue, onFalse) {
+ var r = {};
+ each$1(obj, function (x, i) {
+ (pred(x, i) ? onTrue : onFalse)(x, i);
+ });
+ return r;
+ };
+ var filter = function (obj, pred) {
+ var t = {};
+ internalFilter(obj, pred, objAcc(t), noop);
+ return t;
+ };
+ var has = function (obj, key) {
+ return hasOwnProperty.call(obj, key);
+ };
+
+ var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
+
+ var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+ var isAnchor = function (elm) {
+ return elm && elm.nodeName.toLowerCase() === 'a';
+ };
+ var isLink = function (elm) {
+ return isAnchor(elm) && !!getHref(elm);
+ };
+ var collectNodesInRange = function (rng, predicate) {
+ if (rng.collapsed) {
+ return [];
+ } else {
+ var contents = rng.cloneContents();
+ var walker = new global$2(contents.firstChild, contents);
+ var elements = [];
+ var current = contents.firstChild;
+ do {
+ if (predicate(current)) {
+ elements.push(current);
+ }
+ // eslint-disable-next-line no-cond-assign
+ } while (current = walker.next());
+ return elements;
+ }
+ };
+ var hasProtocol = function (url) {
+ return /^\w+:/i.test(url);
+ };
+ var getHref = function (elm) {
+ var href = elm.getAttribute('data-mce-href');
+ return href ? href : elm.getAttribute('href');
+ };
+ var applyRelTargetRules = function (rel, isUnsafe) {
+ var rules = ['noopener'];
+ var rels = rel ? rel.split(/\s+/) : [];
+ var toString = function (rels) {
+ return global$3.trim(rels.sort().join(' '));
+ };
+ var addTargetRules = function (rels) {
+ rels = removeTargetRules(rels);
+ return rels.length > 0 ? rels.concat(rules) : rules;
+ };
+ var removeTargetRules = function (rels) {
+ return rels.filter(function (val) {
+ return global$3.inArray(rules, val) === -1;
+ });
+ };
+ var newRels = isUnsafe ? addTargetRules(rels) : removeTargetRules(rels);
+ return newRels.length > 0 ? toString(newRels) : '';
+ };
+ var trimCaretContainers = function (text) {
+ return text.replace(/\uFEFF/g, '');
+ };
+ var getAnchorElement = function (editor, selectedElm) {
+ selectedElm = selectedElm || editor.selection.getNode();
+ if (isImageFigure(selectedElm)) {
+ return editor.dom.select('a[href]', selectedElm)[0];
+ } else {
+ return editor.dom.getParent(selectedElm, 'a[href]');
+ }
+ };
+ var getAnchorText = function (selection, anchorElm) {
+ var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
+ return trimCaretContainers(text);
+ };
+ var hasLinks = function (elements) {
+ return global$3.grep(elements, isLink).length > 0;
+ };
+ var hasLinksInSelection = function (rng) {
+ return collectNodesInRange(rng, isLink).length > 0;
+ };
+ var isOnlyTextSelected = function (editor) {
+ var inlineTextElements = editor.schema.getTextInlineElements();
+ var isElement = function (elm) {
+ return elm.nodeType === 1 && !isAnchor(elm) && !has(inlineTextElements, elm.nodeName.toLowerCase());
+ };
+ var elements = collectNodesInRange(editor.selection.getRng(), isElement);
+ return elements.length === 0;
+ };
+ var isImageFigure = function (elm) {
+ return elm && elm.nodeName === 'FIGURE' && /\bimage\b/i.test(elm.className);
+ };
+ var getLinkAttrs = function (data) {
+ return foldl([
+ 'title',
+ 'rel',
+ 'class',
+ 'target'
+ ], function (acc, key) {
+ data[key].each(function (value) {
+ acc[key] = value.length > 0 ? value : null;
+ });
+ return acc;
+ }, { href: data.href });
+ };
+ var handleExternalTargets = function (href, assumeExternalTargets) {
+ if ((assumeExternalTargets === 'http' || assumeExternalTargets === 'https') && !hasProtocol(href)) {
+ return assumeExternalTargets + '://' + href;
+ }
+ return href;
+ };
+ var applyLinkOverrides = function (editor, linkAttrs) {
+ var newLinkAttrs = __assign({}, linkAttrs);
+ if (allowUnsafeLinkTarget(editor) === false) {
+ var newRel = applyRelTargetRules(newLinkAttrs.rel, newLinkAttrs.target === '_blank');
+ newLinkAttrs.rel = newRel ? newRel : null;
+ }
+ if (Optional.from(newLinkAttrs.target).isNone()) {
+ newLinkAttrs.target = getDefaultLinkTarget(editor);
+ }
+ newLinkAttrs.href = handleExternalTargets(newLinkAttrs.href, assumeExternalTargets(editor));
+ return newLinkAttrs;
+ };
+ var updateLink = function (editor, anchorElm, text, linkAttrs) {
+ text.each(function (text) {
+ if (anchorElm.hasOwnProperty('innerText')) {
+ anchorElm.innerText = text;
+ } else {
+ anchorElm.textContent = text;
+ }
+ });
+ editor.dom.setAttribs(anchorElm, linkAttrs);
+ editor.selection.select(anchorElm);
+ };
+ var createLink = function (editor, selectedElm, text, linkAttrs) {
+ if (isImageFigure(selectedElm)) {
+ linkImageFigure(editor, selectedElm, linkAttrs);
+ } else {
+ text.fold(function () {
+ editor.execCommand('mceInsertLink', false, linkAttrs);
+ }, function (text) {
+ editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(text)));
+ });
+ }
+ };
+ var linkDomMutation = function (editor, attachState, data) {
+ var selectedElm = editor.selection.getNode();
+ var anchorElm = getAnchorElement(editor, selectedElm);
+ var linkAttrs = applyLinkOverrides(editor, getLinkAttrs(data));
+ editor.undoManager.transact(function () {
+ if (data.href === attachState.href) {
+ attachState.attach();
+ }
+ if (anchorElm) {
+ editor.focus();
+ updateLink(editor, anchorElm, data.text, linkAttrs);
+ } else {
+ createLink(editor, selectedElm, data.text, linkAttrs);
+ }
+ });
+ };
+ var unlinkSelection = function (editor) {
+ var dom = editor.dom, selection = editor.selection;
+ var bookmark = selection.getBookmark();
+ var rng = selection.getRng().cloneRange();
+ var startAnchorElm = dom.getParent(rng.startContainer, 'a[href]', editor.getBody());
+ var endAnchorElm = dom.getParent(rng.endContainer, 'a[href]', editor.getBody());
+ if (startAnchorElm) {
+ rng.setStartBefore(startAnchorElm);
+ }
+ if (endAnchorElm) {
+ rng.setEndAfter(endAnchorElm);
+ }
+ selection.setRng(rng);
+ editor.execCommand('unlink');
+ selection.moveToBookmark(bookmark);
+ };
+ var unlinkDomMutation = function (editor) {
+ editor.undoManager.transact(function () {
+ var node = editor.selection.getNode();
+ if (isImageFigure(node)) {
+ unlinkImageFigure(editor, node);
+ } else {
+ unlinkSelection(editor);
+ }
+ editor.focus();
+ });
+ };
+ var unwrapOptions = function (data) {
+ var cls = data.class, href = data.href, rel = data.rel, target = data.target, text = data.text, title = data.title;
+ return filter({
+ class: cls.getOrNull(),
+ href: href,
+ rel: rel.getOrNull(),
+ target: target.getOrNull(),
+ text: text.getOrNull(),
+ title: title.getOrNull()
+ }, function (v, _k) {
+ return isNull(v) === false;
+ });
+ };
+ var link = function (editor, attachState, data) {
+ editor.hasPlugin('rtc', true) ? editor.execCommand('createlink', false, unwrapOptions(data)) : linkDomMutation(editor, attachState, data);
+ };
+ var unlink = function (editor) {
+ editor.hasPlugin('rtc', true) ? editor.execCommand('unlink') : unlinkDomMutation(editor);
+ };
+ var unlinkImageFigure = function (editor, fig) {
+ var img = editor.dom.select('img', fig)[0];
+ if (img) {
+ var a = editor.dom.getParents(img, 'a[href]', fig)[0];
+ if (a) {
+ a.parentNode.insertBefore(img, a);
+ editor.dom.remove(a);
+ }
+ }
+ };
+ var linkImageFigure = function (editor, fig, attrs) {
+ var img = editor.dom.select('img', fig)[0];
+ if (img) {
+ var a = editor.dom.create('a', attrs);
+ img.parentNode.insertBefore(a, img);
+ a.appendChild(img);
+ }
+ };
+
+ var getLink = function (editor, elm) {
+ return editor.dom.getParent(elm, 'a[href]');
+ };
+ var getSelectedLink = function (editor) {
+ return getLink(editor, editor.selection.getStart());
+ };
+ var hasOnlyAltModifier = function (e) {
+ return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
+ };
+ var gotoLink = function (editor, a) {
+ if (a) {
+ var href = getHref(a);
+ if (/^#/.test(href)) {
+ var targetEl = editor.$(href);
+ if (targetEl.length) {
+ editor.selection.scrollIntoView(targetEl[0], true);
+ }
+ } else {
+ open(a.href);
+ }
+ }
+ };
+ var openDialog = function (editor) {
+ return function () {
+ editor.fire('contexttoolbar-show', { toolbarKey: 'quicklink' });
+ };
+ };
+ var gotoSelectedLink = function (editor) {
+ return function () {
+ gotoLink(editor, getSelectedLink(editor));
+ };
+ };
+ var setupGotoLinks = function (editor) {
+ editor.on('click', function (e) {
+ var link = getLink(editor, e.target);
+ if (link && global$1.metaKeyPressed(e)) {
+ e.preventDefault();
+ gotoLink(editor, link);
+ }
+ });
+ editor.on('keydown', function (e) {
+ var link = getSelectedLink(editor);
+ if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
+ e.preventDefault();
+ gotoLink(editor, link);
+ }
+ });
+ };
+ var toggleState = function (editor, toggler) {
+ editor.on('NodeChange', toggler);
+ return function () {
+ return editor.off('NodeChange', toggler);
+ };
+ };
+ var toggleActiveState = function (editor) {
+ return function (api) {
+ return toggleState(editor, function () {
+ api.setActive(!editor.mode.isReadOnly() && getAnchorElement(editor, editor.selection.getNode()) !== null);
+ });
+ };
+ };
+ var toggleEnabledState = function (editor) {
+ return function (api) {
+ var updateState = function () {
+ return api.setDisabled(getAnchorElement(editor, editor.selection.getNode()) === null);
+ };
+ updateState();
+ return toggleState(editor, updateState);
+ };
+ };
+ var toggleUnlinkState = function (editor) {
+ return function (api) {
+ var hasLinks$1 = function (parents) {
+ return hasLinks(parents) || hasLinksInSelection(editor.selection.getRng());
+ };
+ var parents = editor.dom.getParents(editor.selection.getStart());
+ api.setDisabled(!hasLinks$1(parents));
+ return toggleState(editor, function (e) {
+ return api.setDisabled(!hasLinks$1(e.parents));
+ });
+ };
+ };
+
+ var register = function (editor) {
+ editor.addCommand('mceLink', function () {
+ openDialog(editor)();
+ });
+ };
+
+ var setup = function (editor) {
+ editor.addShortcut('Meta+K', '', function () {
+ editor.execCommand('mceLink');
+ });
+ };
+
+ var setupButtons = function (editor) {
+ editor.ui.registry.addToggleButton('link', {
+ icon: 'link',
+ tooltip: 'Insert/edit link',
+ onAction: openDialog(editor),
+ onSetup: toggleActiveState(editor)
+ });
+ editor.ui.registry.addButton('openlink', {
+ icon: 'new-tab',
+ tooltip: 'Open link',
+ onAction: gotoSelectedLink(editor),
+ onSetup: toggleEnabledState(editor)
+ });
+ editor.ui.registry.addButton('unlink', {
+ icon: 'unlink',
+ tooltip: 'Remove link',
+ onAction: function () {
+ return unlink(editor);
+ },
+ onSetup: toggleUnlinkState(editor)
+ });
+ };
+ var setupMenuItems = function (editor) {
+ editor.ui.registry.addMenuItem('openlink', {
+ text: 'Open link',
+ icon: 'new-tab',
+ onAction: gotoSelectedLink(editor),
+ onSetup: toggleEnabledState(editor)
+ });
+ editor.ui.registry.addMenuItem('link', {
+ icon: 'link',
+ text: 'Link...',
+ shortcut: 'Meta+K',
+ onAction: openDialog(editor)
+ });
+ editor.ui.registry.addMenuItem('unlink', {
+ icon: 'unlink',
+ text: 'Remove link',
+ onAction: function () {
+ return unlink(editor);
+ },
+ onSetup: toggleUnlinkState(editor)
+ });
+ };
+ var setupContextMenu = function (editor) {
+ var inLink = 'link unlink openlink';
+ var noLink = 'link';
+ editor.ui.registry.addContextMenu('link', {
+ update: function (element) {
+ return hasLinks(editor.dom.getParents(element, 'a')) ? inLink : noLink;
+ }
+ });
+ };
+ var setupContextToolbars = function (editor) {
+ var collapseSelectionToEnd = function (editor) {
+ editor.selection.collapse(false);
+ };
+ var onSetupLink = function (buttonApi) {
+ var node = editor.selection.getNode();
+ buttonApi.setDisabled(!getAnchorElement(editor, node));
+ return noop;
+ };
+ editor.ui.registry.addContextForm('quicklink', {
+ launch: {
+ type: 'contextformtogglebutton',
+ icon: 'link',
+ tooltip: 'Link',
+ onSetup: toggleActiveState(editor)
+ },
+ label: 'Link',
+ predicate: function (node) {
+ return !!getAnchorElement(editor, node) && hasContextToolbar(editor);
+ },
+ initValue: function () {
+ var elm = getAnchorElement(editor);
+ return !!elm ? getHref(elm) : '';
+ },
+ commands: [
+ {
+ type: 'contextformtogglebutton',
+ icon: 'link',
+ tooltip: 'Link',
+ primary: true,
+ onSetup: function (buttonApi) {
+ var node = editor.selection.getNode();
+ buttonApi.setActive(!!getAnchorElement(editor, node));
+ return toggleActiveState(editor)(buttonApi);
+ },
+ onAction: function (formApi) {
+ var anchor = getAnchorElement(editor);
+ var value = formApi.getValue();
+ if (!anchor) {
+ var attachState = {
+ href: value,
+ attach: noop
+ };
+ var onlyText = isOnlyTextSelected(editor);
+ var text = onlyText ? Optional.some(getAnchorText(editor.selection, anchor)).filter(function (t) {
+ return t.length > 0;
+ }).or(Optional.from(value)) : Optional.none();
+ link(editor, attachState, {
+ href: value,
+ text: text,
+ title: Optional.none(),
+ rel: Optional.none(),
+ target: Optional.none(),
+ class: Optional.none()
+ });
+ formApi.hide();
+ } else {
+ editor.undoManager.transact(function () {
+ editor.dom.setAttrib(anchor, 'href', value);
+ collapseSelectionToEnd(editor);
+ formApi.hide();
+ });
+ }
+ }
+ },
+ {
+ type: 'contextformbutton',
+ icon: 'unlink',
+ tooltip: 'Remove link',
+ onSetup: onSetupLink,
+ onAction: function (formApi) {
+ unlink(editor);
+ formApi.hide();
+ }
+ },
+ {
+ type: 'contextformbutton',
+ icon: 'new-tab',
+ tooltip: 'Open link',
+ onSetup: onSetupLink,
+ onAction: function (formApi) {
+ gotoSelectedLink(editor)();
+ formApi.hide();
+ }
+ }
+ ]
+ });
+ };
+
+ function Plugin () {
+ global.add('shortlink', function (editor) {
+ setupButtons(editor);
+ setupMenuItems(editor);
+ setupContextMenu(editor);
+ setupContextToolbars(editor);
+ setupGotoLinks(editor);
+ register(editor);
+ setup(editor);
+ });
+ }
+
+ Plugin();
+
+}());
diff --git a/apps/web/src/components/editor/react-quill.js b/apps/web/src/components/editor/react-quill.js
deleted file mode 100644
index 4c0effe94..000000000
--- a/apps/web/src/components/editor/react-quill.js
+++ /dev/null
@@ -1,307 +0,0 @@
-import React, { Component } from "react";
-import Quill from "quill";
-import Toolbar from "quill/modules/toolbar";
-import BaseTheme from "quill/themes/base";
-import "quill/dist/quill.snow.css";
-import "quill/dist/quill.core.css";
-import "./modules/betterlist";
-import MarkdownShortcuts from "./modules/markdown";
-import MagicUrl from "quill-magic-url";
-import { Box, Text } from "rebass";
-import QuillFocus from "./modules/focus";
-import { isMobile } from "../../utils/dimensions";
-import { showBuyDialog } from "../dialogs/buy-dialog";
-import "./editor.css";
-import { isUserPremium } from "../../common";
-
-Quill.register("modules/markdownShortcuts", MarkdownShortcuts);
-Quill.register("modules/magicUrl", MagicUrl);
-Quill.register("modules/focus", QuillFocus);
-
-const Embed = Quill.import("blots/embed");
-
-function lineBreakMatcher() {
- return { ops: [{ insert: { manualbreak: true } }] };
-}
-
-class SmartBreak extends Embed {}
-SmartBreak.blotName = "manualbreak";
-SmartBreak.tagName = "BR";
-Quill.register(SmartBreak);
-
-const Inline = Quill.import("blots/inline");
-
-// HOTFIX: fix blot getting deleted on auto-correct
-class FontBlot extends Inline {}
-FontBlot.tagName = "FONT";
-Quill.register(FontBlot);
-
-function moduleHandlerWrapper(type, isSimple) {
- return async function (value) {
- if (isSimple && !isUserPremium()) {
- await showBuyDialog();
- return;
- }
- handlers[type].call(this, value);
- };
-}
-
-const handlers = {
- ...Toolbar.DEFAULTS.handlers,
- ...BaseTheme.DEFAULTS.modules.toolbar.handlers,
- color: function (color) {
- this.quill.format("color", color, "user");
- },
- background: function (color) {
- this.quill.format("background", color, "user");
- },
- align: function (position) {
- this.quill.format("align", position, "user");
- },
- "code-block": function (value) {
- this.quill.format("code-block", value, "user");
- },
- size: function (value) {
- this.quill.format("size", value, "user");
- },
- script: function (value) {
- this.quill.format("script", value, "user");
- },
-};
-
-const quillModules = (isSimple, isFocusMode, isMobile) => ({
- toolbar: isMobile
- ? [{ header: "2" }, "bold", "italic", "underline", "link", "code-block"]
- : {
- container: [
- ["bold", "italic", "underline", "strike", "blockquote"],
- [{ header: "2" }, { header: "3" }],
- [
- { align: "" },
- { align: "center" },
- { align: "right" },
- { align: "justify" },
- ],
- [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
- [{ indent: "-1" }, { indent: "+1" }],
- ["code-block", { script: "sub" }, { script: "super" }],
- ["link", "image", "video"],
- [{ header: [false, 2, 3, 4, 5, 6] }],
- [{ size: ["small", false, "large", "huge"] }],
- [{ color: [] }, { background: [] }],
- [{ direction: "rtl" }, "clean"],
- ],
- handlers: {
- list: moduleHandlerWrapper("list", isSimple),
- indent: moduleHandlerWrapper("indent", isSimple),
- direction: moduleHandlerWrapper("direction", isSimple),
- image: moduleHandlerWrapper("image", isSimple),
- video: moduleHandlerWrapper("video", isSimple),
- //formula: moduleHandlerWrapper("formula", isSimple),
- color: moduleHandlerWrapper("color", isSimple),
- background: moduleHandlerWrapper("background", isSimple),
- align: moduleHandlerWrapper("align", isSimple),
- "code-block": moduleHandlerWrapper("code-block", isSimple),
- size: moduleHandlerWrapper("size", isSimple),
- script: moduleHandlerWrapper("script", isSimple),
- },
- },
- // syntax: true,
- markdownShortcuts: isSimple ? undefined : {},
- magicUrl: true,
- history: { maxStack: 1000 * 5 },
- focus: {
- enabled: isFocusMode,
- focusClass: "focused-blot", // Defaults to .focused-blot.
- },
- clipboard: {
- matchers: [["BR", lineBreakMatcher]],
- matchVisual: false,
- },
- keyboard: {
- bindings: {
- linebreak: {
- key: "Enter",
- shiftKey: true,
- handler: function (range) {
- // let currentLeaf = this.quill.getLeaf(range.index)[0];
- // let nextLeaf = this.quill.getLeaf(range.index + 1)[0];
- this.quill.setSelection(range.index, "silent");
- //this.quill.insertText(range.index, "\n", "user");
-
- this.quill.insertEmbed(range.index, "manualbreak", true, "user");
-
- // Insert a second break if:
- // At the end of the editor, OR next leaf has a different parent (<p>)
- // if (nextLeaf === null || currentLeaf.parent !== nextLeaf.parent) {
- // this.quill.insertEmbed(range.index, "manualbreak", true, "user");
- // }
-
- // Now that we've inserted a line break, move the cursor forward
- this.quill.setSelection(range.index + 1, Quill.sources.SILENT);
- },
- },
- },
- },
-});
-
-//
-export default class ReactQuill extends Component {
- /**
- * @type {Quill}
- */
- quill;
- changeTimeout;
- words = 0;
- currentPage = 0;
- pages = [];
- getEditor() {
- return this.quill.editor;
- }
-
- shouldComponentUpdate(nextProps) {
- return (
- this.props.readOnly !== nextProps.readOnly ||
- this.props.isSimple !== nextProps.isSimple ||
- this.props.isFocusMode !== nextProps.isFocusMode
- );
- }
-
- componentDidUpdate() {
- const { isFocusMode } = this.props;
-
- const focus = this.quill.getModule("focus");
- focus.toggle(isFocusMode);
- }
-
- componentDidMount() {
- this._initializeQuill();
- }
-
- _initializeQuill() {
- const {
- placeholder,
- container,
- scrollContainer,
- readOnly,
- initialContent,
- onChange,
- onSave,
- onSelectAll,
- modules,
- id,
- isSimple,
- isFocusMode,
- onQuillInitialized,
- } = this.props;
-
- this.quill = new Quill("#" + id, {
- placeholder,
- bounds: container,
- scrollingContainer: scrollContainer,
- modules: modules || quillModules(isSimple, isFocusMode, isMobile()),
- theme: "snow",
- readOnly,
- });
-
- if (initialContent) {
- this.quill.setContents(initialContent);
- }
-
- if (onChange) {
- this.quill.on("text-change", this.textChangeHandler);
- }
-
- if (onSave) {
- this.quill.keyboard.addBinding(
- {
- key: "S",
- shortKey: true,
- },
- onSave.bind(this, this.quill)
- );
- }
-
- if (onSelectAll) {
- this.quill.keyboard.addBinding(
- {
- key: 65,
- ctrlKey: true,
- },
- {},
- onSelectAll.bind(this, this.quill)
- );
- }
-
- if (onQuillInitialized) onQuillInitialized();
- }
-
- componentWillUnmount() {
- if (!this.quill) return;
- this.quill.off("text-change", this.textChangeHandler);
- }
-
- textChangeHandler = (delta, oldDelta, source) => {
- if (source === "init") return;
- if (this.props.onWordCountChanged)
- this.props.onWordCountChanged(this.getWordCount(oldDelta.compose(delta)));
- clearTimeout(this.changeTimeout);
- this.changeTimeout = setTimeout(
- this.props.onChange,
- this.props.changeInterval
- );
- };
-
- getWordCount(delta) {
- const wordCount = delta.reduce((prev, curr) => {
- if (typeof curr.insert !== "string") return prev;
- const text = curr.insert.trim();
- if (text <= 1) return prev;
- const count = countWords(text); // curr.insert.split(wordCountRegex).length;
- return prev + count;
- }, 0);
- this.words = wordCount;
- return this.words;
- }
-
- init(pages, delta) {
- this.pages = pages;
- this.currentPage = 0;
- this.words = 0;
- this.words = this.getWordCount(delta);
- this.props.onWordCountChanged(this.words);
- this.quill.setContents(pages[this.currentPage], "init");
- }
-
- render() {
- return (
- <Box mx={[2, 2, 0]}>
- <Text as="pre" onFocus={this.props.onFocus} id={this.props.id} />
- </Box>
- );
- }
-}
-
-// const wordCountRegex = /\b\S+\b/g;
-function countWords(str) {
- let count = 0;
- let shouldCount = false;
-
- for (var i = 0; i < str.length; ++i) {
- const s = str.charCodeAt(i);
-
- // 32 = space
- // 13 = \r
- // 10 = \n
- // 42 = *
- if (s === 32 || s === 13 || s === 10 || s === 42 || s === 9) {
- if (shouldCount) continue;
- ++count;
- shouldCount = true;
- } else {
- shouldCount = false;
- }
- }
- if (!shouldCount) ++count;
- return count;
-}
diff --git a/apps/web/src/components/editor/tinymce.js b/apps/web/src/components/editor/tinymce.js
new file mode 100644
index 000000000..0cf8bce3d
--- /dev/null
+++ b/apps/web/src/components/editor/tinymce.js
@@ -0,0 +1,240 @@
+import React, { useEffect } from "react";
+import "tinymce/tinymce";
+import "tinymce/icons/default";
+import "tinymce/themes/silver";
+import "tinymce/plugins/table";
+import "tinymce/plugins/autoresize";
+import "tinymce/plugins/quickbars";
+import "tinymce/plugins/searchreplace";
+import "tinymce/plugins/lists";
+import "tinymce/plugins/advlist";
+import "tinymce/plugins/autolink";
+import "tinymce/plugins/textpattern";
+import "tinymce/plugins/textcolor";
+import "tinymce/plugins/paste";
+import "tinymce/plugins/importcss";
+import "tinymce/plugins/hr";
+import "tinymce/plugins/imagetools";
+import "tinymce/plugins/noneditable";
+import "tinymce/plugins/table";
+import "tinymce/plugins/directionality";
+import "tinymce/plugins/media";
+import "./plugins/code";
+import "./plugins/shortlink";
+import "./plugins/quickimage";
+import "./editor.css";
+import { Editor } from "@tinymce/tinymce-react";
+import { isUserPremium } from "../../common";
+import { showBuyDialog } from "../dialogs/buy-dialog";
+import { useStore as useThemeStore } from "../../stores/theme-store";
+
+const markdownPatterns = [
+ { start: "*", end: "*", format: "italic" },
+ { start: "**", end: "**", format: "bold" },
+ { start: "`", end: "`", format: "code" },
+ { start: "#", format: "h1" },
+ { start: "##", format: "h2" },
+ { start: "###", format: "h3" },
+ { start: "####", format: "h4" },
+ { start: "#####", format: "h5" },
+ { start: "######", format: "h6" },
+ { start: "* ", cmd: "InsertUnorderedList" },
+ { start: "- ", cmd: "InsertUnorderedList" },
+ {
+ start: "1. ",
+ cmd: "InsertOrderedList",
+ value: { "list-style-type": "decimal" },
+ },
+ {
+ start: "1) ",
+ cmd: "InsertOrderedList",
+ value: { "list-style-type": "decimal" },
+ },
+ {
+ start: "a. ",
+ cmd: "InsertOrderedList",
+ value: { "list-style-type": "lower-alpha" },
+ },
+ {
+ start: "a) ",
+ cmd: "InsertOrderedList",
+ value: { "list-style-type": "lower-alpha" },
+ },
+ {
+ start: "i. ",
+ cmd: "InsertOrderedList",
+ value: { "list-style-type": "lower-roman" },
+ },
+ {
+ start: "i) ",
+ cmd: "InsertOrderedList",
+ value: { "list-style-type": "lower-roman" },
+ },
+ { start: "---", replacement: "<hr/>" },
+ { start: "--", replacement: "—" },
+ { start: "-", replacement: "—" },
+ { start: "(c)", replacement: "©" },
+];
+
+const premiumCommands = [
+ "InsertUnorderedList",
+ "InsertOrderedList",
+ "indent",
+ "JustifyFull",
+ "JustifyLeft",
+ "JustifyRight",
+ "JustifyCenter",
+ "FontSize",
+ "mceApplyTextcolor",
+ "mceInsertContent",
+ "mceMedia",
+ "mceDirectionRTL",
+];
+
+function useSkin() {
+ const theme = useThemeStore((store) => store.theme);
+ return theme === "dark"
+ ? ["skins/notesnook", "skins/notesnook-dark"]
+ : ["skins/notesnook-dark", "skins/notesnook"];
+}
+
+function TinyMCE(props) {
+ const {
+ changeInterval,
+ onChange,
+ onWordCountChanged,
+ onSave,
+ placeholder,
+ simple,
+ initialValue,
+ onFocus,
+ editorRef,
+ isNew,
+ } = props;
+ const [oldSkin, newSkin] = useSkin();
+ const tinymceRef = editorRef;
+ useEffect(() => {
+ if (tinymceRef.current.editor.initialized) {
+ tinymceRef.current.editor.dom.styleSheetLoader.unload(
+ `${oldSkin}/content.min.css`
+ );
+ tinymceRef.current.editor.dom.styleSheetLoader.load(
+ `${newSkin}/content.min.css`
+ );
+ tinymceRef.current.editor.ui.styleSheetLoader.unload(
+ `${oldSkin}/skin.min.css`
+ );
+ tinymceRef.current.editor.ui.styleSheetLoader.load(
+ `${newSkin}/skin.min.css`
+ );
+ }
+ }, [tinymceRef, newSkin, oldSkin]);
+ return (
+ <Editor
+ ref={tinymceRef}
+ onFocus={onFocus}
+ initialValue={initialValue}
+ init={{
+ menubar: false,
+ statusbar: false,
+ link_quicklink: true,
+ plugins:
+ "paste importcss searchreplace autolink directionality code quickimage shortlink media table hr advlist lists imagetools textpattern noneditable quickbars autoresize",
+ toolbar_mode: "sliding",
+ contextmenu: false,
+ quickbars_selection_toolbar:
+ "bold italic code h2 h3 quicklink blockquote",
+ quickbars_insert_toolbar: false,
+ skin_url: newSkin,
+ content_css: newSkin,
+ content_style: `
+ span.diff-del {
+ background-color: #FDB0C0;
+ }
+
+ span.diff-ins {
+ background-color: #CAFFFB;
+ }
+`,
+ toolbar: simple
+ ? false
+ : `bold italic underline strikethrough code | fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | hr | image media link table | ltr rtl | searchreplace`,
+ mobile: {
+ toolbar_mode: "scrolling",
+ },
+ block_formats:
+ "Paragraph=p; Header 2=h2; Header 3=h3; Header 4=h4; Header 5=h5; Header 6=h6; Code=pre",
+ textpattern_patterns: markdownPatterns,
+ placeholder: placeholder || "Start writing your note here...",
+ target_list: false,
+ link_title: false,
+ imagetools_toolbar: "rotateleft rotateright | flipv fliph",
+ image_upload_handler: function (blobInfo, success) {
+ success(
+ "data:" + blobInfo.blob().type + ";base64," + blobInfo.base64()
+ );
+ },
+ }}
+ onBeforeExecCommand={async (command) => {
+ // if (
+ // premiumCommands.some((cmd) => command.command === cmd) &&
+ // !isUserPremium()
+ // ) {
+ // command.preventDefault();
+ // await showBuyDialog();
+ // return;
+ // }
+ }}
+ onKeyDown={(e) => {
+ if (e.ctrlKey && e.key === "s") {
+ e.preventDefault();
+ onSave();
+ }
+ }}
+ onEditorChange={(content, editor) => {
+ if (onWordCountChanged) {
+ const text = editor.getContent({
+ format: "text",
+ no_events: true,
+ get: true,
+ content,
+ });
+ onWordCountChanged(countWords(text));
+ }
+
+ if (editor.isLoading) {
+ editor.isLoading = false;
+ return;
+ }
+
+ clearTimeout(editor.changeTimeout);
+ editor.changeTimeout = setTimeout(
+ () => onChange(content, editor),
+ changeInterval
+ );
+ }}
+ />
+ );
+}
+
+export default React.memo(TinyMCE, () => true);
+
+function countWords(str) {
+ let count = 0;
+ let shouldCount = false;
+
+ for (var i = 0; i < str.length; ++i) {
+ const s = str[i];
+
+ if (s === " " || s === "\r" || s === "\n" || s === "*") {
+ if (!shouldCount) continue;
+ ++count;
+ shouldCount = false;
+ } else {
+ shouldCount = true;
+ }
+ }
+
+ if (shouldCount) ++count;
+ return count;
+}
diff --git a/apps/web/src/components/editor/toolbar.js b/apps/web/src/components/editor/toolbar.js
index ba72f269b..ead117902 100644
--- a/apps/web/src/components/editor/toolbar.js
+++ b/apps/web/src/components/editor/toolbar.js
@@ -1,15 +1,14 @@
import React, { useEffect, useMemo, useState } from "react";
+import tinymce from "tinymce/tinymce";
import { Button, Flex, Text } from "rebass";
import * as Icon from "../icons";
import { useStore as useAppStore } from "../../stores/app-store";
import { useStore as useThemeStore } from "../../stores/theme-store";
import { useStore, store } from "../../stores/editor-store";
import { showToast } from "../../utils/toast";
-import { EventManagers } from "../../utils/observablearray";
import Animated from "../animated";
function Toolbar(props) {
- const { quill } = props;
const sessionState = useStore((store) => store.session.state);
const [undoable, setUndoable] = useState(false);
const [redoable, setRedoable] = useState(false);
@@ -41,21 +40,29 @@ function Toolbar(props) {
}, [isTitleVisible]);
useEffect(() => {
- if (!quill?.history) return;
-
function updateState() {
- setUndoable(quill.history.stack.undo.length > 0);
- setRedoable(quill.history.stack.redo.length > 0);
+ if (!tinymce.activeEditor) return;
+ setUndoable(tinymce.activeEditor.undoManager.hasUndo());
+ setRedoable(tinymce.activeEditor.undoManager.hasRedo());
}
+ tinymce.EditorManager.once("AddEditor", () => {
+ tinymce.activeEditor.on("Undo", updateState);
+ tinymce.activeEditor.on("BeforeAddUndo", updateState);
+ tinymce.activeEditor.on("AddUndo", updateState);
+ tinymce.activeEditor.on("Redo", updateState);
+ tinymce.activeEditor.on("ClearUndos", updateState);
+ tinymce.activeEditor.on("TypingUndo", updateState);
- EventManagers.redo.subscribeMulti(["pop", "push"], updateState);
- EventManagers.undo.subscribeMulti(["pop", "push"], updateState);
-
- return () => {
- EventManagers.undo.unsubscribeAll();
- EventManagers.redo.unsubscribeAll();
- };
- }, [sessionState, quill]);
+ tinymce.activeEditor.on("remove", () => {
+ tinymce.activeEditor.off("Undo", updateState);
+ tinymce.activeEditor.off("BeforeAddUndo", updateState);
+ tinymce.activeEditor.off("AddUndo", updateState);
+ tinymce.activeEditor.off("Redo", updateState);
+ tinymce.activeEditor.off("ClearUndos", updateState);
+ tinymce.activeEditor.off("TypingUndo", updateState);
+ });
+ });
+ }, [sessionState]);
const tools = useMemo(
() => [
@@ -69,13 +76,13 @@ function Toolbar(props) {
title: "Undo",
icon: Icon.Undo,
enabled: undoable,
- onClick: () => quill.history.undo(),
+ onClick: () => tinymce.activeEditor.execCommand("Undo"),
},
{
title: "Redo",
icon: Icon.Redo,
enabled: redoable,
- onClick: () => quill.history.redo(),
+ onClick: () => tinymce.activeEditor.execCommand("Redo"),
},
{
title: isFocusMode ? "Normal mode" : "Focus mode",
@@ -86,7 +93,7 @@ function Toolbar(props) {
if (isFocusMode) exitFullscreen(document);
else enterFullscreen(document.documentElement);
toggleFocusMode();
- if (quill) quill.focus();
+ if (tinymce.activeEditor) tinymce.activeEditor.focus();
},
},
{
@@ -97,7 +104,6 @@ function Toolbar(props) {
},
],
[
- quill,
redoable,
undoable,
toggleFocusMode,
diff --git a/apps/web/src/components/spliteditor/deltatoggle.js b/apps/web/src/components/spliteditor/deltatoggle.js
index a5963d8a1..47550e512 100644
--- a/apps/web/src/components/spliteditor/deltatoggle.js
+++ b/apps/web/src/components/spliteditor/deltatoggle.js
@@ -4,9 +4,6 @@ import { timeConverter } from "../../utils/time";
import { store as notestore } from "../../stores/note-store";
import { db } from "../../common";
import { hashNavigate } from "../../navigation";
-import DeltaTransformer from "../deltatransformer";
-
-const deltaTransformer = new DeltaTransformer();
function DeltaToggle(props) {
const {
@@ -63,10 +60,10 @@ function DeltaToggle(props) {
mr={2}
onClick={async () => {
const { selectedEditor, otherEditor } = editors();
- await resolveConflict(
- deltaTransformer.cleanDifference(selectedEditor.getContents()),
- deltaTransformer.cleanDifference(otherEditor.getContents())
- );
+ // await resolveConflict(
+ // deltaTransformer.cleanDifference(selectedEditor.getContents()),
+ // deltaTransformer.cleanDifference(otherEditor.getContents())
+ // );
}}
p={1}
px={2}
@@ -78,10 +75,10 @@ function DeltaToggle(props) {
variant="primary"
onClick={async () => {
if (isOtherSelected) {
- const { selectedEditor } = editors();
- await resolveConflict(
- deltaTransformer.cleanDifference(selectedEditor.getContents())
- );
+ // const { selectedEditor } = editors();
+ // await resolveConflict(
+ // deltaTransformer.cleanDifference(selectedEditor.getContents())
+ // );
} else {
onToggle();
}
diff --git a/apps/web/src/components/spliteditor/differ.js b/apps/web/src/components/spliteditor/differ.js
new file mode 100644
index 000000000..88abaff50
--- /dev/null
+++ b/apps/web/src/components/spliteditor/differ.js
@@ -0,0 +1,905 @@
+/*
+ * htmldiff.js is a library that compares HTML content. It creates a diff between two
+ * HTML documents by combining the two documents and wrapping the differences with
+ * <ins> and <del> tags. Here is a high-level overview of how the diff works.
+ *
+ * 1. Tokenize the before and after HTML with html_to_tokens.
+ * 2. Generate a list of operations that convert the before list of tokens to the after
+ * list of tokens with calculate_operations, which does the following:
+ * a. Find all the matching blocks of tokens between the before and after lists of
+ * tokens with find_matching_blocks. This is done by finding the single longest
+ * matching block with find_match, then recursively finding the next longest
+ * matching block that precede and follow the longest matching block with
+ * recursively_find_matching_blocks.
+ * b. Determine insertions, deletions, and replacements from the matching blocks.
+ * This is done in calculate_operations.
+ * 3. Render the list of operations by wrapping tokens with <ins> and <del> tags where
+ * appropriate with render_operations.
+ *
+ * Example usage:
+ *
+ * var htmldiff = require('htmldiff.js');
+ *
+ * htmldiff('<p>this is some text</p>', '<p>this is some more text</p>')
+ * == '<p>this is some <ins>more </ins>text</p>'
+ *
+ * htmldiff('<p>this is some text</p>', '<p>this is some more text</p>', 'diff-class')
+ * == '<p>this is some <ins class="diff-class">more </ins>text</p>'
+ */
+(function () {
+ function is_end_of_tag(char) {
+ return char === ">";
+ }
+
+ function is_start_of_tag(char) {
+ return char === "<";
+ }
+
+ function is_close_tag(tag) {
+ return /^\s*<\s*\/[^>]+>\s*$/.test(tag);
+ }
+
+ function is_whitespace(char) {
+ return /^\s+$/.test(char);
+ }
+
+ function is_tag(token) {
+ return /^\s*<[^>]+>\s*$/.test(token);
+ }
+
+ function isnt_tag(token) {
+ return !is_tag(token);
+ }
+
+ /*
+ * Checks if the current word is the beginning of an atomic tag. An atomic tag is one whose
+ * child nodes should not be compared - the entire tag should be treated as one token. This
+ * is useful for tags where it does not make sense to insert <ins> and <del> tags.
+ *
+ * @param {string} word The characters of the current token read so far.
+ *
+ * @return {string|null} The name of the atomic tag if the word will be an atomic tag,
+ * null otherwise
+ */
+ function is_start_of_atomic_tag(word) {
+ var result = /^<(iframe|object|math|svg|script)/.exec(word);
+ if (result) {
+ result = result[1];
+ }
+ return result;
+ }
+
+ /*
+ * Checks if the current word is the end of an atomic tag (i.e. it has all the characters,
+ * except for the end bracket of the closing tag, such as '<iframe></iframe').
+ *
+ * @param {string} word The characters of the current token read so far.
+ * @param {string} tag The ending tag to look for.
+ *
+ * @return {boolean} True if the word is now a complete token (including the end tag),
+ * false otherwise.
+ */
+ function is_end_of_atomic_tag(word, tag) {
+ return word.substring(word.length - tag.length - 2) === "</" + tag;
+ }
+
+ /*
+ * Checks if a tag is a void tag.
+ *
+ * @param {string} token The token to check.
+ *
+ * @return {boolean} True if the token is a void tag, false otherwise.
+ */
+ function is_void_tag(token) {
+ return /^\s*<[^>]+\/>\s*$/.test(token);
+ }
+
+ /*
+ * Checks if a token can be wrapped inside a tag.
+ *
+ * @param {string} token The token to check.
+ *
+ * @return {boolean} True if the token can be wrapped inside a tag, false otherwise.
+ */
+ function is_wrappable(token) {
+ return (
+ isnt_tag(token) || is_start_of_atomic_tag(token) || is_void_tag(token)
+ );
+ }
+
+ /*
+ * A Match stores the information of a matching block. A matching block is a list of
+ * consecutive tokens that appear in both the before and after lists of tokens.
+ *
+ * @param {number} start_in_before The index of the first token in the list of before tokens.
+ * @param {number} start_in_after The index of the first token in the list of after tokens.
+ * @param {number} length The number of consecutive matching tokens in this block.
+ */
+ function Match(start_in_before, start_in_after, length) {
+ this.start_in_before = start_in_before;
+ this.start_in_after = start_in_after;
+ this.length = length;
+ this.end_in_before = this.start_in_before + this.length - 1;
+ this.end_in_after = this.start_in_after + this.length - 1;
+ }
+
+ function return_dual_pane(before, after) {
+ return {
+ before: before,
+ after: after,
+ };
+ }
+
+ /*
+ * Merge tokens in component by regex rule.
+ *
+ * @param {find_regex} dictate witch tag we want to merge.
+ * @param {words Array.<string>} input data already parsed array(html tags) by html_tokens method.
+ * @return {Array.<string>} The list of tokens with merged components requested by component_search_role.
+ */
+ function merge_html_by_class(find_regex, words) {
+ var merged_words_array = [],
+ merged_words_to_string = "",
+ count_open_tags = 0;
+
+ for (var i = 0; i < words.length; i++) {
+ var tag_part = words[i];
+ //merge html tags until parent tag is not closed (also ignore self closed html tags)
+ if (count_open_tags > 0 || find_regex.test(tag_part)) {
+ if (
+ is_start_of_tag(tag_part.slice(0, 1)) &&
+ !is_void_tag(tag_part) &&
+ !is_start_of_atomic_tag(tag_part)
+ ) {
+ count_open_tags += is_close_tag(tag_part) ? -1 : 1;
+ }
+ //combine all html string from html tokens while all condition are true
+ merged_words_to_string += tag_part;
+ //after parent tag is closed push as one html token
+ if (count_open_tags === 0) {
+ merged_words_array.push(merged_words_to_string);
+ merged_words_to_string = "";
+ }
+ } else {
+ //all tags that are not part of components we wont to merge just ignore
+ merged_words_array.push(tag_part);
+ }
+ }
+ return merged_words_array;
+ }
+
+ /*
+ * Tokenizes a string of HTML.
+ *
+ * @param {string} html The string to tokenize.
+ *
+ * @return {Array.<string>} The list of tokens.
+ */
+ function html_to_tokens(html, components_search_rule) {
+ var mode = "char";
+ var current_word = "";
+ var current_atomic_tag = "";
+ var words = [];
+ for (var i = 0; i < html.length; i++) {
+ var char = html[i];
+ switch (mode) {
+ case "tag":
+ var atomic_tag = is_start_of_atomic_tag(current_word);
+ if (atomic_tag) {
+ mode = "atomic_tag";
+ current_atomic_tag = atomic_tag;
+ current_word += char;
+ } else if (is_end_of_tag(char)) {
+ current_word += ">";
+ words.push(current_word);
+ current_word = "";
+ if (is_whitespace(char)) {
+ mode = "whitespace";
+ } else {
+ mode = "char";
+ }
+ } else {
+ current_word += char;
+ }
+ break;
+ case "atomic_tag":
+ if (
+ is_end_of_tag(char) &&
+ is_end_of_atomic_tag(current_word, current_atomic_tag)
+ ) {
+ current_word += ">";
+ words.push(current_word);
+ current_word = "";
+ current_atomic_tag = "";
+ mode = "char";
+ } else {
+ current_word += char;
+ }
+ break;
+ case "char":
+ if (is_start_of_tag(char)) {
+ if (current_word) {
+ words.push(current_word);
+ }
+ current_word = "<";
+ mode = "tag";
+ } else if (/\s/.test(char)) {
+ if (current_word) {
+ words.push(current_word);
+ }
+ current_word = char;
+ mode = "whitespace";
+ } else if (/[\w\d\#@]/.test(char)) {
+ current_word += char;
+ } else if (/&/.test(char)) {
+ if (current_word) {
+ words.push(current_word);
+ }
+ current_word = char;
+ } else {
+ current_word += char;
+ words.push(current_word);
+ current_word = "";
+ }
+ break;
+ case "whitespace":
+ if (is_start_of_tag(char)) {
+ if (current_word) {
+ words.push(current_word);
+ }
+ current_word = "<";
+ mode = "tag";
+ } else if (is_whitespace(char)) {
+ current_word += char;
+ } else {
+ if (current_word) {
+ words.push(current_word);
+ }
+ current_word = char;
+ mode = "char";
+ }
+ break;
+ default:
+ throw new Error("Unknown mode " + mode);
+ }
+ }
+ if (current_word) {
+ words.push(current_word);
+ }
+
+ return components_search_rule
+ ? merge_html_by_class(components_search_rule, words)
+ : words;
+ }
+
+ /*
+ * Creates a key that should be used to match tokens. This is useful, for example, if we want
+ * to consider two open tag tokens as equal, even if they don't have the same attributes. We
+ * use a key instead of overwriting the token because we may want to render the original string
+ * without losing the attributes.
+ *
+ * @param {string} token The token to create the key for.
+ *
+ * @return {string} The identifying key that should be used to match before and after tokens.
+ */
+ function get_key_for_token(token) {
+ var tag_name = /<([^\s>]+)[\s>]/.exec(token);
+ if (tag_name) {
+ return "<" + tag_name[1].toLowerCase() + ">";
+ }
+ if (token) {
+ return token.replace(/(\s+|&nbsp;|&#160;)/g, " ");
+ }
+ return token;
+ }
+
+ /*
+ * Finds the matching block with the most consecutive tokens within the given range in the
+ * before and after lists of tokens.
+ *
+ * @param {Array.<string>} before_tokens The before list of tokens.
+ * @param {Array.<string>} after_tokens The after list of tokens.
+ * @param {Object} index_of_before_locations_in_after_tokens The index that is used to search
+ * for tokens in the after list.
+ * @param {number} start_in_before The beginning of the range in the list of before tokens.
+ * @param {number} end_in_before The end of the range in the list of before tokens.
+ * @param {number} start_in_after The beginning of the range in the list of after tokens.
+ * @param {number} end_in_after The end of the range in the list of after tokens.
+ *
+ * @return {Match} A Match that describes the best matching block in the given range.
+ */
+ function find_match(
+ before_tokens,
+ after_tokens,
+ index_of_before_locations_in_after_tokens,
+ start_in_before,
+ end_in_before,
+ start_in_after,
+ end_in_after
+ ) {
+ var best_match_in_before = start_in_before;
+ var best_match_in_after = start_in_after;
+ var best_match_length = 0;
+ var match_length_at = {};
+ for (
+ var index_in_before = start_in_before;
+ index_in_before < end_in_before;
+ index_in_before++
+ ) {
+ var new_match_length_at = {};
+ var looking_for = get_key_for_token(before_tokens[index_in_before]);
+ var locations_in_after =
+ index_of_before_locations_in_after_tokens[looking_for];
+
+ for (var i = 0; i < locations_in_after.length; i++) {
+ var index_in_after = locations_in_after[i];
+ if (index_in_after < start_in_after) continue;
+ if (index_in_after >= end_in_after) break;
+
+ if (!match_length_at[index_in_after - 1]) {
+ match_length_at[index_in_after - 1] = 0;
+ }
+ var new_match_length = match_length_at[index_in_after - 1] + 1;
+ new_match_length_at[index_in_after] = new_match_length;
+
+ if (new_match_length > best_match_length) {
+ best_match_in_before = index_in_before - new_match_length + 1;
+ best_match_in_after = index_in_after - new_match_length + 1;
+ best_match_length = new_match_length;
+ }
+ }
+ match_length_at = new_match_length_at;
+ }
+ if (best_match_length !== 0) {
+ return new Match(
+ best_match_in_before,
+ best_match_in_after,
+ best_match_length
+ );
+ }
+ return null;
+ }
+
+ /*
+ * Finds all the matching blocks within the given range in the before and after lists of
+ * tokens. This function is called recursively to find the next best matches that precede
+ * and follow the first best match.
+ *
+ * @param {Array.<string>} before_tokens The before list of tokens.
+ * @param {Array.<string>} after_tokens The after list of tokens.
+ * @param {Object} index_of_before_locations_in_after_tokens The index that is used to search
+ * for tokens in the after list.
+ * @param {number} start_in_before The beginning of the range in the list of before tokens.
+ * @param {number} end_in_before The end of the range in the list of before tokens.
+ * @param {number} start_in_after The beginning of the range in the list of after tokens.
+ * @param {number} end_in_after The end of the range in the list of after tokens.
+ * @param {Array.<Match>} matching_blocks The list of matching blocks found so far.
+ *
+ * @return {Array.<Match>} The list of matching blocks in this range.
+ */
+ function recursively_find_matching_blocks(
+ before_tokens,
+ after_tokens,
+ index_of_before_locations_in_after_tokens,
+ start_in_before,
+ end_in_before,
+ start_in_after,
+ end_in_after,
+ matching_blocks
+ ) {
+ var match = find_match(
+ before_tokens,
+ after_tokens,
+ index_of_before_locations_in_after_tokens,
+ start_in_before,
+ end_in_before,
+ start_in_after,
+ end_in_after
+ );
+ if (match) {
+ if (
+ start_in_before < match.start_in_before &&
+ start_in_after < match.start_in_after
+ ) {
+ recursively_find_matching_blocks(
+ before_tokens,
+ after_tokens,
+ index_of_before_locations_in_after_tokens,
+ start_in_before,
+ match.start_in_before,
+ start_in_after,
+ match.start_in_after,
+ matching_blocks
+ );
+ }
+ matching_blocks.push(match);
+ if (
+ match.end_in_before <= end_in_before &&
+ match.end_in_after <= end_in_after
+ ) {
+ recursively_find_matching_blocks(
+ before_tokens,
+ after_tokens,
+ index_of_before_locations_in_after_tokens,
+ match.end_in_before + 1,
+ end_in_before,
+ match.end_in_after + 1,
+ end_in_after,
+ matching_blocks
+ );
+ }
+ }
+ return matching_blocks;
+ }
+
+ /*
+ * Creates an index (A.K.A. hash table) that will be used to match the list of before
+ * tokens with the list of after tokens.
+ *
+ * @param {Object} options An object with the following:
+ * - {Array.<string>} find_these The list of tokens that will be used to search.
+ * - {Array.<string>} in_these The list of tokens that will be returned.
+ *
+ * @return {Object} An index that can be used to search for tokens.
+ */
+ function create_index(options) {
+ if (!options.find_these) {
+ throw new Error("params must have find_these key");
+ }
+ if (!options.in_these) {
+ throw new Error("params must have in_these key");
+ }
+ var queries = options.find_these.map(function (token) {
+ return get_key_for_token(token);
+ });
+ var results = options.in_these.map(function (token) {
+ return get_key_for_token(token);
+ });
+ var index = {};
+ for (var i = 0; i < queries.length; i++) {
+ var query = queries[i];
+ index[query] = [];
+ var idx = results.indexOf(query);
+ while (idx !== -1) {
+ index[query].push(idx);
+ idx = results.indexOf(query, idx + 1);
+ }
+ }
+ return index;
+ }
+
+ /*
+ * Finds all the matching blocks in the before and after lists of tokens. This function
+ * is a wrapper for the recursive function recursively_find_matching_blocks.
+ *
+ * @param {Array.<string>} before_tokens The before list of tokens.
+ * @param {Array.<string>} after_tokens The after list of tokens.
+ *
+ * @return {Array.<Match>} The list of matching blocks.
+ */
+ function find_matching_blocks(before_tokens, after_tokens) {
+ var matching_blocks = [];
+ var index_of_before_locations_in_after_tokens = create_index({
+ find_these: before_tokens,
+ in_these: after_tokens,
+ });
+ return recursively_find_matching_blocks(
+ before_tokens,
+ after_tokens,
+ index_of_before_locations_in_after_tokens,
+ 0,
+ before_tokens.length,
+ 0,
+ after_tokens.length,
+ matching_blocks
+ );
+ }
+
+ /*
+ * Gets a list of operations required to transform the before list of tokens into the
+ * after list of tokens. An operation describes whether a particular list of consecutive
+ * tokens are equal, replaced, inserted, or deleted.
+ *
+ * @param {Array.<string>} before_tokens The before list of tokens.
+ * @param {Array.<string>} after_tokens The after list of tokens.
+ *
+ * @return {Array.<Object>} The list of operations to transform the before list of
+ * tokens into the after list of tokens, where each operation has the following
+ * keys:
+ * - {string} action One of {'replace', 'insert', 'delete', 'equal'}.
+ * - {number} start_in_before The beginning of the range in the list of before tokens.
+ * - {number} end_in_before The end of the range in the list of before tokens.
+ * - {number} start_in_after The beginning of the range in the list of after tokens.
+ * - {number} end_in_after The end of the range in the list of after tokens.
+ */
+ function calculate_operations(before_tokens, after_tokens) {
+ if (!before_tokens) {
+ throw new Error("before_tokens?");
+ }
+ if (!after_tokens) {
+ throw new Error("after_tokens?");
+ }
+
+ var position_in_before = 0;
+ var position_in_after = 0;
+ var operations = [];
+ var action_map = {
+ "false,false": "replace",
+ "true,false": "insert",
+ "false,true": "delete",
+ "true,true": "none",
+ };
+ var matches = find_matching_blocks(before_tokens, after_tokens);
+ matches.push(new Match(before_tokens.length, after_tokens.length, 0));
+
+ for (var index = 0; index < matches.length; index++) {
+ var match = matches[index];
+ var match_starts_at_current_position_in_before =
+ position_in_before === match.start_in_before;
+ var match_starts_at_current_position_in_after =
+ position_in_after === match.start_in_after;
+ var action_up_to_match_positions =
+ action_map[
+ [
+ match_starts_at_current_position_in_before,
+ match_starts_at_current_position_in_after,
+ ].toString()
+ ];
+ if (action_up_to_match_positions !== "none") {
+ operations.push({
+ action: action_up_to_match_positions,
+ start_in_before: position_in_before,
+ end_in_before:
+ action_up_to_match_positions !== "insert"
+ ? match.start_in_before - 1
+ : void 0,
+ start_in_after: position_in_after,
+ end_in_after:
+ action_up_to_match_positions !== "delete"
+ ? match.start_in_after - 1
+ : void 0,
+ });
+ }
+ if (match.length !== 0) {
+ operations.push({
+ action: "equal",
+ start_in_before: match.start_in_before,
+ end_in_before: match.end_in_before,
+ start_in_after: match.start_in_after,
+ end_in_after: match.end_in_after,
+ });
+ }
+ position_in_before = match.end_in_before + 1;
+ position_in_after = match.end_in_after + 1;
+ }
+
+ var post_processed = [];
+ var last_op = {
+ action: "none",
+ };
+
+ function is_single_whitespace(op) {
+ if (op.action !== "equal") {
+ return false;
+ }
+ if (op.end_in_before - op.start_in_before !== 0) {
+ return false;
+ }
+ return /^\s$/.test(
+ before_tokens.slice(op.start_in_before, op.end_in_before + 1)
+ );
+ }
+
+ for (var i = 0; i < operations.length; i++) {
+ var op = operations[i];
+
+ if (
+ (is_single_whitespace(op) && last_op.action === "replace") ||
+ (op.action === "replace" && last_op.action === "replace")
+ ) {
+ last_op.end_in_before = op.end_in_before;
+ last_op.end_in_after = op.end_in_after;
+ } else {
+ post_processed.push(op);
+ last_op = op;
+ }
+ }
+ return post_processed;
+ }
+
+ /*
+ * Returns a list of tokens of a particular type starting at a given index.
+ *
+ * @param {number} start The index of first token to test.
+ * @param {Array.<string>} content The list of tokens.
+ * @param {function} predicate A function that returns true if a token is of
+ * a particular type, false otherwise. It should accept the following
+ * parameters:
+ * - {string} The token to test.
+ */
+ function consecutive_where(start, content, predicate) {
+ content = content.slice(start, content.length + 1);
+ var last_matching_index = null;
+
+ for (var index = 0; index < content.length; index++) {
+ var token = content[index];
+ var answer = predicate(token);
+
+ if (answer === true) {
+ last_matching_index = index;
+ }
+ if (answer === false) {
+ break;
+ }
+ }
+
+ if (last_matching_index !== null) {
+ return content.slice(0, last_matching_index + 1);
+ }
+ return [];
+ }
+
+ /*
+ * Wraps and concatenates a list of tokens with a tag. Does not wrap tag tokens,
+ * unless they are wrappable (i.e. void and atomic tags).
+ *
+ * @param {sting} tag The tag name of the wrapper tags.
+ * @param {Array.<string>} content The list of tokens to wrap.
+ * @param {string} class_name (Optional) The class name to include in the wrapper tag.
+ */
+ function wrap(tag, content, class_name) {
+ var rendering = "";
+ var position = 0;
+ var length = content.length;
+
+ while (true) {
+ if (position >= length) break;
+ var non_tags = consecutive_where(position, content, is_wrappable);
+ position += non_tags.length;
+ if (non_tags.length !== 0) {
+ var val = non_tags.join("");
+ if (val.trim()) {
+ rendering += `<span class="diff-${tag} ${class_name}">${val}</span>`;
+ }
+ }
+
+ if (position >= length) break;
+ var tags = consecutive_where(position, content, is_tag);
+ position += tags.length;
+ rendering += tags.join("");
+ }
+ return rendering;
+ }
+
+ /*
+ * op_map.equal/insert/delete/replace are functions that render an operation into
+ * HTML content.
+ *
+ * @param {Object} op The operation that applies to a prticular list of tokens. Has the
+ * following keys:
+ * - {string} action One of {'replace', 'insert', 'delete', 'equal'}.
+ * - {number} start_in_before The beginning of the range in the list of before tokens.
+ * - {number} end_in_before The end of the range in the list of before tokens.
+ * - {number} start_in_after The beginning of the range in the list of after tokens.
+ * - {number} end_in_after The end of the range in the list of after tokens.
+ * @param {Array.<string>} before_tokens The before list of tokens.
+ * @param {Array.<string>} after_tokens The after list of tokens.
+ * @param {string} class_name (Optional) The class name to include in the wrapper tag.
+ *
+ * @return {string} The rendering of that operation.
+ */
+ var op_map = {
+ equal: function (op, before_tokens, after_tokens, class_name) {
+ return after_tokens
+ .slice(op.start_in_after, op.end_in_after + 1)
+ .join("");
+ },
+ insert: function (op, before_tokens, after_tokens, class_name) {
+ var val = after_tokens.slice(op.start_in_after, op.end_in_after + 1);
+ return wrap("ins", val, class_name);
+ },
+ delete: function (op, before_tokens, after_tokens, class_name) {
+ var val = before_tokens.slice(op.start_in_before, op.end_in_before + 1);
+ return wrap("del", val, class_name);
+ },
+ };
+
+ op_map.replace = function (op, before_tokens, after_tokens, class_name) {
+ return [
+ op_map["delete"](op, before_tokens, after_tokens, class_name),
+ op_map.insert(op, before_tokens, after_tokens, class_name),
+ ];
+ };
+
+ /*
+ * Renders a list of operations into HTML content. The result is the combined version
+ * of the before and after tokens with the differences wrapped in tags.
+ *
+ * @param {Array.<string>} before_tokens The before list of tokens.
+ * @param {Array.<string>} after_tokens The after list of tokens.
+ * @param {Array.<Object>} operations The list of operations to transform the before
+ * list of tokens into the after list of tokens, where each operation has the
+ * following keys:
+ * - {string} action One of {'replace', 'insert', 'delete', 'equal'}.
+ * - {number} start_in_before The beginning of the range in the list of before tokens.
+ * - {number} end_in_before The end of the range in the list of before tokens.
+ * - {number} start_in_after The beginning of the range in the list of after tokens.
+ * - {number} end_in_after The end of the range in the list of after tokens.
+ * @param {string} class_name (Optional) The class name to include in the wrapper tag.
+ *
+ * @return {string} The rendering of the list of operations.
+ */
+ function render_operations(
+ before_tokens,
+ after_tokens,
+ operations,
+ class_name
+ ) {
+ var rendering = "";
+ for (var i = 0; i < operations.length; i++) {
+ var op = operations[i];
+ const result = op_map[op.action](
+ op,
+ before_tokens,
+ after_tokens,
+ class_name
+ );
+ if (op.action === "replace") {
+ rendering += result[0] + result[1];
+ } else {
+ rendering += result;
+ }
+ }
+ return rendering;
+ }
+
+ /**
+ * htmldiff thinks that atomic or component objects are equal if their tag names are the same, because of it <div class="slideshow"> === <div class="here"> for example
+ * this function compares them
+ */
+ function render_equal_components(
+ before,
+ after,
+ ops,
+ class_name,
+ components_search_rule
+ ) {
+ var i, j, r, attrs;
+ var op;
+ var amount;
+ var before_token, after_token;
+ var before_token_match, after_token_match;
+ for (i = 0; i < ops.length; i++) {
+ op = ops[i];
+ if (op.action === "equal") {
+ amount = op.end_in_before - op.start_in_before + 1; // +1 since the array is 0 based
+ for (j = 0; j < amount; j++) {
+ before_token = before[op.start_in_before + j];
+ after_token = after[op.start_in_after + j];
+ if (before_token !== after_token) {
+ before_token_match = components_search_rule.exec(before_token);
+ after_token_match = components_search_rule.exec(after_token);
+ if (before_token_match && after_token_match) {
+ if (
+ before_token_match[1].toLowerCase() ===
+ after_token_match[1].toLowerCase()
+ ) {
+ // compare content of these two same components
+ r = diff(before_token, after_token, class_name);
+ after[op.start_in_after + j] = r;
+ } else {
+ // components are different, wrap before by 'del' and after by 'ins'
+ attrs = class_name ? ' class="' + class_name + '"' : "";
+ r =
+ "<del" +
+ attrs +
+ ">" +
+ before_token +
+ "</del>" +
+ "<ins" +
+ attrs +
+ ">" +
+ after_token +
+ "</ins>";
+ after[op.start_in_after + j] = r;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Compares two pieces of HTML content and returns the combined content with differences
+ * wrapped in <ins> and <del> tags.
+ *
+ * @param {string} before The HTML content before the changes.
+ * @param {string} after The HTML content after the changes.
+ * @param {string} class_name (Optional) The class attribute to include in <ins> and <del> tags.
+ *
+ * @return {string} The combined HTML content with differences wrapped in <ins> and <del> tags.
+ */
+ function diff(before, after, class_name, components_search_rule) {
+ if (before === after) return before;
+ before = html_to_tokens(before, components_search_rule);
+ after = html_to_tokens(after, components_search_rule);
+ var ops = calculate_operations(before, after);
+
+ if (components_search_rule) {
+ render_equal_components(
+ before,
+ after,
+ ops,
+ class_name,
+ components_search_rule
+ );
+ }
+
+ return render_operations(before, after, ops, class_name);
+ }
+
+ function render_operations_dual_pane(
+ before_tokens,
+ after_tokens,
+ operations
+ ) {
+ var after_render, before_render, next_block, op, _i, _len;
+ before_render = "";
+ after_render = "";
+ for (_i = 0, _len = operations.length; _i < _len; _i++) {
+ op = operations[_i];
+ next_block = op_map[op.action](op, before_tokens, after_tokens);
+ switch (op.action) {
+ case "equal":
+ before_render += next_block;
+ after_render += next_block;
+ break;
+ case "insert":
+ after_render += next_block;
+ break;
+ case "delete":
+ before_render += next_block;
+ break;
+ case "replace":
+ before_render += next_block[0];
+ after_render += next_block[1];
+ }
+ }
+ return return_dual_pane(before_render, after_render);
+ }
+
+ function diff_dual_pane(before, after) {
+ var ops;
+ if (before === after) {
+ return return_dual_pane(before, after);
+ }
+ before = html_to_tokens(before);
+ after = html_to_tokens(after);
+ ops = calculate_operations(before, after);
+
+ console.log("NEW", ops);
+ return render_operations_dual_pane(before, after, ops);
+ }
+
+ diff.html_to_tokens = html_to_tokens;
+ diff.merge_html_by_class = merge_html_by_class;
+ diff.find_matching_blocks = find_matching_blocks;
+ find_matching_blocks.find_match = find_match;
+ find_matching_blocks.create_index = create_index;
+ find_matching_blocks.get_key_for_token = get_key_for_token;
+ diff.calculate_operations = calculate_operations;
+ diff.render_operations = render_operations;
+ diff.diff_dual_pane = diff_dual_pane;
+
+ if (typeof define === "function") {
+ // eslint-disable-next-line no-undef
+ define([], function () {
+ return diff;
+ });
+ } else if (typeof module !== "undefined" && module !== null) {
+ module.exports = diff;
+ } else {
+ this.htmldiff = diff;
+ }
+}.call(this));
diff --git a/apps/web/src/components/spliteditor/index.js b/apps/web/src/components/spliteditor/index.js
index dba3888f4..001346879 100644
--- a/apps/web/src/components/spliteditor/index.js
+++ b/apps/web/src/components/spliteditor/index.js
@@ -6,17 +6,16 @@ import { store as notesStore } from "../../stores/note-store";
import { db } from "../../common";
import { useStore as useAppStore } from "../../stores/app-store";
import { hashNavigate } from "../../navigation";
-import DeltaTransformer from "../deltatransformer";
-
-const deltaTransformer = new DeltaTransformer();
+import diff from "./differ";
function SplitEditor(props) {
const { noteId } = props;
const setIsEditorOpen = useAppStore((store) => store.setIsEditorOpen);
const [conflictedNote, setConflictedNote] = useState();
- const [remoteDelta, setRemoteDelta] = useState();
- const [localDelta, setLocalDelta] = useState();
+ const [remoteContent, setRemoteContent] = useState();
+ const [localContent, setLocalContent] = useState();
+ const [htmlDiff, setHtmlDiff] = useState({});
useEffect(() => {
(async function () {
@@ -28,10 +27,11 @@ function SplitEditor(props) {
}
notesStore.setSelectedNote(noteId);
note = note.data;
- const delta = await db.content.raw(note.contentId);
+ const content = await db.content.raw(note.contentId);
setConflictedNote(note);
- setLocalDelta({ ...delta, conflicted: false });
- setRemoteDelta(delta.conflicted);
+ setLocalContent({ ...content, conflicted: false });
+ setRemoteContent(content.conflicted);
+ setHtmlDiff(diff.diff_dual_pane(content.data, content.conflicted.data));
})();
}, [noteId]);
@@ -42,7 +42,7 @@ function SplitEditor(props) {
const [localEditor, remoteEditor] = [useRef(), useRef()];
const [selectedDelta, setSelectedDelta] = useState(-1);
- if (!conflictedNote || !localDelta || !remoteDelta) return null;
+ if (!conflictedNote || !localContent || !remoteContent) return null;
return (
<Flex width="100%" flex="1 1 auto" flexDirection="column" overflow="hidden">
<Text
@@ -72,7 +72,7 @@ function SplitEditor(props) {
>
<DeltaToggle
label="Current note"
- dateEdited={localDelta.dateEdited}
+ dateEdited={localContent.dateEdited}
isSelected={selectedDelta === 0}
isOtherSelected={selectedDelta === 1}
onToggle={() => setSelectedDelta((s) => (s === 0 ? -1 : 0))}
@@ -102,16 +102,7 @@ function SplitEditor(props) {
borderColor: "border",
}}
>
- <SimpleEditor
- pref={localEditor}
- container=".firstEditor"
- id="firstQuill"
- delta={deltaTransformer.highlightDifference(
- localDelta.data,
- remoteDelta.data,
- "#FDB0C0"
- )}
- />
+ <SimpleEditor pref={localEditor} content={htmlDiff.before} />
</Box>
</Flex>
<Flex
@@ -136,7 +127,7 @@ function SplitEditor(props) {
note={conflictedNote}
isSelected={selectedDelta === 1}
isOtherSelected={selectedDelta === 0}
- dateEdited={remoteDelta.dateEdited}
+ dateEdited={remoteContent.dateEdited}
onToggle={() => setSelectedDelta((s) => (s === 1 ? -1 : 1))}
editors={() => ({
selectedEditor: localEditor.current.quill,
@@ -144,16 +135,7 @@ function SplitEditor(props) {
})}
/>
<Box px={2} overflowY="auto">
- <SimpleEditor
- pref={remoteEditor}
- container=".secondEditor"
- id="secondQuill"
- delta={deltaTransformer.highlightDifference(
- remoteDelta.data,
- localDelta.data,
- "#CAFFFB"
- )}
- />
+ <SimpleEditor pref={remoteEditor} content={htmlDiff.after} />
</Box>
</Flex>
</Flex>
diff --git a/apps/web/src/components/spliteditor/simpleeditor.js b/apps/web/src/components/spliteditor/simpleeditor.js
index b63c7c1d1..37c01404d 100644
--- a/apps/web/src/components/spliteditor/simpleeditor.js
+++ b/apps/web/src/components/spliteditor/simpleeditor.js
@@ -1,25 +1,17 @@
import React, { Suspense } from "react";
import EditorLoading from "../editor/loading";
-const ReactQuill = React.lazy(() => import("../editor/react-quill"));
+const ReactMCE = React.lazy(() => import("../editor/tinymce"));
function SimpleEditor(props) {
- const { delta, container, id, pref } = props;
+ const { content, pref } = props;
return (
<Suspense fallback={<EditorLoading />}>
- <ReactQuill
- ref={pref}
- id={id}
- modules={{ toolbar: [] }}
- initialContent={delta}
- onQuillInitialized={() => {
- const toolbar = document.querySelector(
- `${container} .ql-toolbar.ql-snow`
- );
- if (toolbar) toolbar.remove();
- }}
+ <ReactMCE
+ editorRef={pref}
+ simple
+ initialValue={content}
placeholder="Type anything here"
- container={container}
/>
</Suspense>
);
diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js
index d08ce6aa1..149a695f5 100644
--- a/apps/web/src/stores/editor-store.js
+++ b/apps/web/src/stores/editor-store.js
@@ -28,8 +28,8 @@ const DEFAULT_SESSION = {
dateEdited: 0,
totalWords: 0,
content: {
- type: "delta",
- data: [],
+ type: "tiny",
+ data: "",
},
};
class EditorStore extends BaseStore {
diff --git a/apps/web/src/views/home.js b/apps/web/src/views/home.js
index 2a43da294..65d0e14de 100644
--- a/apps/web/src/views/home.js
+++ b/apps/web/src/views/home.js
@@ -11,17 +11,17 @@ function Home() {
(async function () {
await db.notes.init();
store.refresh();
- // const note = db.notes.note("7180399cb8ea4b7dfa015a0f").data;
- // const delta = await db.content.raw(note.contentId);
+ // const note = db.notes.note("7d91f4af509bfc824d005262").data;
+ // const data = await db.content.raw(note.contentId);
- // const note2 = db.notes.note("f85150f4a3850fb44dc65569").data;
- // const delta2 = await db.content.raw(note2.contentId);
+ // const note2 = db.notes.note("7a9dc2c53a534e578f28861b").data;
+ // const data2 = await db.content.raw(note2.contentId);
- // const delta3 = { ...delta, conflicted: delta2 };
+ // const data3 = { ...data, conflicted: data2 };
- // await db.content.add(delta3);
+ // await db.content.add(data3);
// await db.notes.add({ id: note.id, conflicted: true, resolved: false });
- // console.log(delta3);
+ // console.log(data3);
setIsLoading(false);
})();
}, []);
diff --git a/apps/web/yarn.lock b/apps/web/yarn.lock
index ea41266fe..09220bdcb 100644
--- a/apps/web/yarn.lock
+++ b/apps/web/yarn.lock
@@ -1932,6 +1932,14 @@
"@svgr/plugin-svgo" "^4.3.1"
loader-utils "^1.2.3"
+"@tinymce/tinymce-react@^3.9.0":
+ version "3.9.0"
+ resolved "https://registry.yarnpkg.com/@tinymce/tinymce-react/-/tinymce-react-3.9.0.tgz#7c8f2fcd5b7487d9c2882936a7ba2662300810b6"
+ integrity sha512-1DgMahuESQuGMvSpCabw2WrgfRQmPTuCOpThMB/aFJYSpGoLYe7kV4QJwMEWB1HXBfTV9ahG6yMNcP9PTfYk5A==
+ dependencies:
+ prop-types "^15.6.2"
+ tinymce "^5.6.2"
+
"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.0", "@types/babel__core@^7.1.7":
version "7.1.12"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d"
@@ -2482,6 +2490,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4=
+ansi-regex@^1.0.0, ansi-regex@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-1.1.1.tgz#41c847194646375e6a1a5d10c3ca054ef9fc980d"
+ integrity sha1-QchHGUZGN15qGl0Qw8oFTvn8mA0=
+
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
@@ -2502,7 +2515,7 @@ ansi-regex@^5.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
-ansi-styles@^2.2.1:
+ansi-styles@^2.0.1, ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
@@ -3493,6 +3506,17 @@ caseless@~0.12.0:
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.0.0.tgz#b3cf4ed0ff5397c99c75b8f679db2f52831f96dc"
+ integrity sha1-s89O0P9Tl8mcdbj2edsvUoMfltw=
+ dependencies:
+ ansi-styles "^2.0.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^1.0.3"
+ strip-ansi "^2.0.1"
+ supports-color "^1.3.0"
+
[email protected], chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
@@ -3722,6 +3746,13 @@ co@^4.6.0:
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/coa/-/coa-0.4.0.tgz#252bc1be9740af15d826e490e8b1393c2fe2a062"
+ integrity sha1-JSvBvpdArxXYJuSQ6LE5PC/ioGI=
+ dependencies:
+ q "~0.9.6"
+
coa@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3"
@@ -4567,6 +4598,11 @@ diff-sequences@^26.6.2:
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-1.0.8.tgz#343276308ec991b7bc82267ed55bc1411f971666"
+ integrity sha1-NDJ2MI7Jkbe8giZ+1VvBQR+XFmY=
+
diffie-hellman@^5.0.0:
version "5.0.3"
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
@@ -4677,6 +4713,11 @@ domhandler@^2.3.0:
dependencies:
domelementtype "1"
+domino@^2.1.6:
+ version "2.1.6"
+ resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.6.tgz#fe4ace4310526e5e7b9d12c7de01b7f485a57ffe"
+ integrity sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ==
+
version "1.5.1"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
@@ -5974,6 +6015,11 @@ get-package-type@^0.1.0:
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
+get-stdin@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
+ integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=
+
get-stdin@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
@@ -6025,7 +6071,7 @@ glob-to-regexp@^0.3.0:
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
-glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
+glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
@@ -6167,6 +6213,14 @@ harmony-reflect@^1.4.6:
resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.1.tgz#c108d4f2bb451efef7a37861fdbdae72c9bdefa9"
integrity sha512-WJTeyp0JzGtHcuMsi7rw2VwtkvLa+JyfEKJCFyfcS0+CDkjQ5lHPu7zEhFZP+PDSRrEgXa5Ah0l1MbgbE41XjA==
+has-ansi@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-1.0.3.tgz#c0b5b1615d9e382b0ff67169d967b425e48ca538"
+ integrity sha1-wLWxYV2eOCsP9nFp2We0JeSMpTg=
+ dependencies:
+ ansi-regex "^1.1.0"
+ get-stdin "^4.0.1"
+
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
@@ -6325,6 +6379,19 @@ html-comment-regex@^1.1.0:
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7"
integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==
+html-differ@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/html-differ/-/html-differ-1.4.0.tgz#bb95a74d54d8f107b75ad5ada166a6924093b828"
+ integrity sha512-7kW2niHCIVOsRaligGdwV4B44YsVxKrOaRNec+u7Ab2r1sBziXcaWxWJ5lj0apIGaTZprprQAg2t2SUkGoPaUw==
+ dependencies:
+ chalk "1.0.0"
+ coa "0.4.0"
+ diff "1.0.8"
+ lodash "^4.0.0"
+ parse5 "1.1.3"
+ vow "0.4.13"
+ vow-fs "0.3.6"
+
html-encoding-sniffer@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8"
@@ -8435,7 +8502,7 @@ lodash.uniq@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
-"lodash@>=3.5 <5", lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.17.5:
+"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.17.5:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
@@ -8990,8 +9057,8 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
"notes-core@git+ssh://[email protected]:streetwriters/notesnook-core.git":
- version "5.5.0"
- resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#24f491823c9ec69fe8c2ac9df85ebdf49abafabd"
+ version "6.0.0"
+ resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#c0ff85606b010c7c4667c964d24d8a96a1f080ce"
dependencies:
fast-sort "^2.0.1"
fuzzysearch "^1.0.3"
@@ -9001,6 +9068,7 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
quill-delta-to-html "^0.12.0"
quill-delta-to-markdown "https://github.com/streetwriters/quill-delta-to-markdown"
transfun "^1.0.2"
+ turndown "^7.0.0"
npm-run-path@^2.0.0:
version "2.0.2"
@@ -9455,6 +9523,11 @@ parse-passwd@^1.0.0:
resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.1.3.tgz#8bab58d06525f00e4e37d755116eb82e7241f142"
+ integrity sha1-i6tY0GUl8A5ON9dVEW64LnJB8UI=
+
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
@@ -10604,6 +10677,11 @@ q@^1.1.2:
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
+q@~0.9.6:
+ version "0.9.7"
+ resolved "https://registry.yarnpkg.com/q/-/q-0.9.7.tgz#4de2e6cb3b29088c9e4cbc03bf9d42fb96ce2f75"
+ integrity sha1-TeLmyzspCIyeTLwDv51C+5bOL3U=
+
qclone@^1.0.4:
version "1.0.10"
resolved "https://registry.yarnpkg.com/qclone/-/qclone-1.0.10.tgz#9222f150e81c0b0680b83091ba22a263eb95a7f8"
@@ -12148,6 +12226,13 @@ [email protected], strip-ansi@^6.0.0:
dependencies:
ansi-regex "^5.0.0"
+strip-ansi@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-2.0.1.tgz#df62c1aa94ed2f114e1d0f21fd1d50482b79a60e"
+ integrity sha1-32LBqpTtLxFOHQ8h/R1QSCt5pg4=
+ dependencies:
+ ansi-regex "^1.0.0"
+
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
@@ -12241,6 +12326,11 @@ stylehacks@^4.0.0:
postcss "^7.0.0"
postcss-selector-parser "^3.0.0"
+supports-color@^1.3.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.3.1.tgz#15758df09d8ff3b4acc307539fabe27095e1042d"
+ integrity sha1-FXWN8J2P87SswwdTn6vicJXhBC0=
+
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
@@ -12439,6 +12529,11 @@ tiny-emitter@^2.0.0:
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==
+tinymce@^5.6.2:
+ version "5.6.2"
+ resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-5.6.2.tgz#4c20c22e328c5d0baab204928dbc2b0ecbed18b4"
+ integrity sha512-z7zvM5seOPiW86/vqf08kStwW5Zs5U9oQfuqh2rTj4jEcT2QzxT0v72i2zw3W6rbTLldkAej6edFZphj5ee5zg==
+
tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
@@ -12588,6 +12683,13 @@ tunnel-agent@^0.6.0:
dependencies:
safe-buffer "^5.0.1"
+turndown@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/turndown/-/turndown-7.0.0.tgz#19b2a6a2d1d700387a1e07665414e4af4fec5225"
+ integrity sha512-G1FfxfR0mUNMeGjszLYl3kxtopC4O9DRRiMlMDDVHvU1jaBkGFg4qxIyjIk2aiKLHyDyZvZyu4qBO2guuYBy3Q==
+ dependencies:
+ domino "^2.1.6"
+
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
@@ -12829,6 +12931,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
+uuid@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
+ integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=
+
uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
@@ -12881,6 +12988,33 @@ vm-browserify@^1.0.1:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/vow-fs/-/vow-fs-0.3.6.tgz#2d4c59be22e2bf2618ddf597ab4baa923be7200d"
+ integrity sha1-LUxZviLivyYY3fWXq0uqkjvnIA0=
+ dependencies:
+ glob "^7.0.5"
+ uuid "^2.0.2"
+ vow "^0.4.7"
+ vow-queue "^0.4.1"
+
+vow-queue@^0.4.1:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/vow-queue/-/vow-queue-0.4.3.tgz#4ba8f64b56e9212c0dbe57f1405aeebd54cce78d"
+ integrity sha512-/poAKDTFL3zYbeQg7cl4BGcfP4sGgXKrHnRFSKj97dteUFu8oyXMwIcdwu8NSx/RmPGIuYx1Bik/y5vU4H/VKw==
+ dependencies:
+ vow "^0.4.17"
+
+ version "0.4.13"
+ resolved "https://registry.yarnpkg.com/vow/-/vow-0.4.13.tgz#e7c14f1bd9c8be0e7359a4597fe2d1ef6d1a7e88"
+ integrity sha1-58FPG9nIvg5zWaRZf+LR720afog=
+
+vow@^0.4.17, vow@^0.4.7:
+ version "0.4.20"
+ resolved "https://registry.yarnpkg.com/vow/-/vow-0.4.20.tgz#77ca6ef0828e0043a93e55dc37030226519ce711"
+ integrity sha512-YYoSYXUYABqY08D/WrjcWJxJSErcILRRTQpcPyUc0SFfgIPKSUFzVt7u1HC3TXGJZM/qhsSjCLNQstxqf7asgQ==
+
w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"