A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix theme not loading in note preview
ammarahm-ed4e4a725d0b27
diff --git a/apps/mobile/android/app/src/main/assets/plaineditor.html b/apps/mobile/android/app/src/main/assets/plaineditor.htmlindex f0d4be4a3..68a061c6a 100644--- a/apps/mobile/android/app/src/main/assets/plaineditor.html+++ b/apps/mobile/android/app/src/main/assets/plaineditor.html@@ -177,8 +177,9 @@<div placeholder="Write something..." contenteditable="true" class="htmldiff_div"></div>- <script src="./listeners.js"></script><script src="./constants.js"></script>+ <script src="./listeners.js"></script>+<script>function reactNativeEventHandler(type, value) {if (window.ReactNativeWebView) {diff --git a/apps/mobile/html/Web.bundle/site/constants.js b/apps/mobile/html/Web.bundle/site/constants.jsindex 381b7cb44..df3709aa7 100755--- a/apps/mobile/html/Web.bundle/site/constants.js+++ b/apps/mobile/html/Web.bundle/site/constants.js@@ -118,6 +118,8 @@ let styleElementDocument = null;let styleElementEditorDocument = null;function setTheme() {++ if (globalThis.tinymce) {if (pageTheme.colors.night) {dark();} else {@@ -125,7 +127,339 @@ function setTheme() {}addStyle();-+ let node2 = `+ .mce-content-body table[data-mce-selected], {+ outline: 3px solid ${pageTheme.colors.shade} !important;+}++.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 video[data-mce-selected] {+ outline: 3px solid ${pageTheme.colors.shade} !important;+ border-radius:5px;+}++.mce-content-body div.mce-resizehandle {+ background-color: ${pageTheme.colors.accent} !important;+ border-color: ${pageTheme.colors.accent} !important;+ border-style: solid;+ border-width: 1px;+ box-sizing: border-box;+ height: 30px !important;+ position: absolute;+ width: 30px !important;+ z-index: 10000;+ opacity:0.5;+}++.mce-content-body a {+ color: ${pageTheme.colors.accent} !important;+}++.mce-content-body [data-mce-selected="inline-boundary"] {+ background-color: ${pageTheme.colors.shade} !important;+}++::selection {+ color: white !important;+ background: ${pageTheme.colors.accent} !important;+}+++.mce-content-body a[data-mce-selected] {+ box-shadow: none !important;+}++span.attachment {+ overflow: hidden;+ position: relative;+ z-index: 1;+ user-select: none;+ display: inline-flex;+ align-items: center;+ background-color: ${pageTheme.colors.nav};+ padding: 0px 5px 0px 22px;+ border-radius: 3px;+ border: 1px solid var(--border);+ font-size: 0.85rem;+ cursor: pointer !important;+ word-break: break-all;+ max-width: 250px;+}++span.attachment .filename {+ white-space: nowrap;+ text-overflow: ellipsis;+ overflow: hidden;+}++span.attachment:not([data-progress])::after {+ content: attr(data-size);+ color: ${pageTheme.colors.icon};+ margin-left: 5px;+ font-size: 0.7rem;+ white-space: nowrap;+}++span.attachment[data-progress]::after {+ content: attr(data-progress);+ color:${pageTheme.colors.icon};+ margin-left: 5px;+ font-size: 0.7rem;+ white-space: nowrap;+}++span.attachment::before {+ display: inline-block;+ z-index: -1;+ position: absolute;+ top: 0;+ left: 0;+ content: "";+ width: var(--progress, 0px);+ height: 100%;+ transition: width 100ms ease-in;+ background-size: 15px 15px;+ background-repeat: no-repeat;+ background-position: 5px 1.5px;+ background-color: var(--border);+}++span.attachment em::before {+ content: "";+ position: absolute;+ width: 15px;+ height: 15px;+ left: 5px;+ top: 1.5px;+ background-color: ${pageTheme.colors.pri};+ -webkit-mask-size: 15px 15px;+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z'%3E%3C/path%3E%3C/svg%3E");+ mask-size: 15px 15px;+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z'%3E%3C/path%3E%3C/svg%3E");+}++.mce-content-body code[data-mce-selected="inline-boundary"] {+ background-color: ${pageTheme.colors.nav} !important;+}++.mce-content-body code {+ background-color: ${pageTheme.colors.nav} !important;+ border: 1px solid var(--border);+ border-radius: 5px;+ padding: 3px 5px 0px 5px;+}++code {+ font-family: ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono,+ Menlo, monospace !important;+ font-size:10pt !important+}++.tox-checklist > li,+.checklist > li {+ list-style: none;+ margin: 0.25em 0;+}++.tox-checklist > li::before,+.checklist > li::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: 1.1em;+ margin-left: -2.5em;+ margin-top: 0.125em;+ position: absolute;+ width: 1.5em;+ padding-left: 1em;+}++++.tox-checklist li.tox-checklist--checked::before,+.checklist li.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%23${pageTheme.colors.accent.replace(+ '#',+ ''+ )}%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');+}++.tox-checklist li.tox-checklist--checked,+.checklist li.checked {+ color:${pageTheme.colors.icon}+}++[dir="rtl"] .tox-checklist > li::before,+[dir="rtl"] .checklist > li::before {+ margin-left: 0;+ margin-right: -1.5em;+}++a[data-mce-selected],+td[data-mce-selected],+th[data-mce-selected],+table[data-mce-selected] {+ box-shadow: none !important;+}++/* TABLE */++.mce-content-body table {+ table-layout: fixed;+ border-collapse: separate !important;+ border-spacing: 0px;+ border: none !important;+ border-radius: 5px;+ font-size: 14px;+ min-width: 100% !important;+}++tr td,+tr th {+ padding: 5px !important;+ border: 1px solid ${pageTheme.colors.border} !important;+}++thead tr td,+tbody tr td,+thead tr th,+tbody tr th {+ border-left: none !important;+ border-top: none !important;+}++tfoot tr td,+tfoot tr th, {+ border-left: none !important;+}++table caption,+thead td {+ border-bottom: 1px solid ${pageTheme.colors.border} !important;+}++tfoot td {+ border-top: 1px solid ${pageTheme.colors.border} !important;+}++.mce-content-body td:last-child {+ border-right: none !important;+}++.mce-content-body tbody tr:last-child td {+ border-bottom: none !important;+}++.mce-content-body tr:nth-child(even) {+ background-color: ${pageTheme.colors.nav};+}++table thead {+ font-weight: bold !important;+}++.mce-content-body .table-container {+ border: 1px solid ${pageTheme.colors.border} !important;+ border-radius: 5px;+ overflow-x: auto;+ max-width: 100%;+}++td,+th {+ min-width:100px !important;+}++.mce-content-body td > *,+.mce-content-body th > * {+ margin: 0 !important;+}++.mce-content-body td > * + *,+.mce-content-body th > * + * {+ margin-top: 0.75em !important;+}++.mce-content-body td[data-mce-selected]::after,+.mce-content-body th[data-mce-selected]::after {+ background-color: ${pageTheme.colors.shade} !important;+ border: 1px solid ${pageTheme.colors.shade} !important;+ bottom: -1px;+ content: "";+ left: -1px;+ mix-blend-mode: multiply;+ position: absolute;+ right: -1px;+ top: -1px;+}++.mce-content-body table td:hover {+ background-color: ${pageTheme.colors.shade};+}++.mce-content-body table[data-mce-selected] tr[data-mce-active] {+ background-color: ${pageTheme.colors.shade};+ /* color: var(--static); */+}++.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ td:not([data-mce-active]),+.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ th:not([data-mce-active]) {+ border-bottom: 1px solid ${pageTheme.colors.accent + 'B3'} !important;+ border-top: 1px solid ${pageTheme.colors.accent + 'B3'} !important;+}++.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ td:not([data-mce-active]):first-child,+.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ th:not([data-mce-active]):first-child {+ border-left: 1px solid ${pageTheme.colors.accent + 'B3'} !important;+}++.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ td:not([data-mce-active]):last-child,+.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ th:not([data-mce-active]):last-child {+ border-right: 1px solid ${pageTheme.colors.accent + 'B3'} !important;+}++.mce-content-body table[data-mce-selected] td[data-mce-active],+.mce-content-body table[data-mce-selected] th[data-mce-active] {+ border: 2px solid ${pageTheme.colors.accent + 'B3'} !important;+ background-color: ${pageTheme.colors.shade};+}++`;++ if (tinymce && tinymce.activeEditor) {+ let editorHead =+ tinymce.activeEditor.contentDocument.getElementsByTagName('head')[0];++ if (!styleElementEditorDocument) {+ styleElementEditorDocument = document.createElement('style');+ styleElementEditorDocument.innerHTML = node2;+ editorHead.appendChild(styleElementEditorDocument);+ } else {+ styleElementEditorDocument.innerHTML = node2;+ }+ }++ }let node = `#titleInput {@@ -314,143 +648,8 @@ function setTheme() {color: white !important;background: ${pageTheme.colors.accent} !important;}---- `;-- let node2 = `- .mce-content-body table[data-mce-selected], {- outline: 3px solid ${pageTheme.colors.shade} !important;-}--.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 video[data-mce-selected] {- outline: 3px solid ${pageTheme.colors.shade} !important;- border-radius:5px;-}--.mce-content-body div.mce-resizehandle {- background-color: ${pageTheme.colors.accent} !important;- border-color: ${pageTheme.colors.accent} !important;- border-style: solid;- border-width: 1px;- box-sizing: border-box;- height: 30px !important;- position: absolute;- width: 30px !important;- z-index: 10000;- opacity:0.5;-}--.mce-content-body a {- color: ${pageTheme.colors.accent} !important;-}--.mce-content-body [data-mce-selected="inline-boundary"] {- background-color: ${pageTheme.colors.shade} !important;-}--::selection {- color: white !important;- background: ${pageTheme.colors.accent} !important;-}---.mce-content-body a[data-mce-selected] {- box-shadow: none !important;-}--span.attachment {- overflow: hidden;- position: relative;- z-index: 1;- user-select: none;- display: inline-flex;- align-items: center;- background-color: ${pageTheme.colors.nav};- padding: 0px 5px 0px 22px;- border-radius: 3px;- border: 1px solid var(--border);- font-size: 0.85rem;- cursor: pointer !important;- word-break: break-all;- max-width: 250px;-}--span.attachment .filename {- white-space: nowrap;- text-overflow: ellipsis;- overflow: hidden;-}--span.attachment:not([data-progress])::after {- content: attr(data-size);- color: ${pageTheme.colors.icon};- margin-left: 5px;- font-size: 0.7rem;- white-space: nowrap;-}-span.attachment[data-progress]::after {- content: attr(data-progress);- color:${pageTheme.colors.icon};- margin-left: 5px;- font-size: 0.7rem;- white-space: nowrap;-}--span.attachment::before {- display: inline-block;- z-index: -1;- position: absolute;- top: 0;- left: 0;- content: "";- width: var(--progress, 0px);- height: 100%;- transition: width 100ms ease-in;- background-size: 15px 15px;- background-repeat: no-repeat;- background-position: 5px 1.5px;- background-color: var(--border);-}--span.attachment em::before {- content: "";- position: absolute;- width: 15px;- height: 15px;- left: 5px;- top: 1.5px;- background-color: ${pageTheme.colors.pri};- -webkit-mask-size: 15px 15px;- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z'%3E%3C/path%3E%3C/svg%3E");- mask-size: 15px 15px;- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z'%3E%3C/path%3E%3C/svg%3E");-}--.mce-content-body code[data-mce-selected="inline-boundary"] {- background-color: ${pageTheme.colors.nav} !important;-}--.mce-content-body code {- background-color: ${pageTheme.colors.nav} !important;- border: 1px solid var(--border);- border-radius: 5px;- padding: 3px 5px 0px 5px;-}--code {- font-family: ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono,- Menlo, monospace !important;- font-size:10pt !important-}--.tox-checklist > li,+ .tox-checklist > li,.checklist > li {list-style: none;margin: 0.25em 0;@@ -489,13 +688,6 @@ code {margin-right: -1.5em;}-a[data-mce-selected],-td[data-mce-selected],-th[data-mce-selected],-table[data-mce-selected] {- box-shadow: none !important;-}-/* TABLE */.mce-content-body table {@@ -635,21 +827,11 @@ th {border: 2px solid ${pageTheme.colors.accent + 'B3'} !important;background-color: ${pageTheme.colors.shade};}++++ `;-`;-- if (tinymce.activeEditor) {- let editorHead =- tinymce.activeEditor.contentDocument.getElementsByTagName('head')[0];-- if (!styleElementEditorDocument) {- styleElementEditorDocument = document.createElement('style');- styleElementEditorDocument.innerHTML = node2;- editorHead.appendChild(styleElementEditorDocument);- } else {- styleElementEditorDocument.innerHTML = node2;- }- }if (!styleElementDocument) {styleElementDocument = document.createElement('style');diff --git a/apps/mobile/html/Web.bundle/site/plaineditor.html b/apps/mobile/html/Web.bundle/site/plaineditor.htmlindex f0d4be4a3..68a061c6a 100644--- a/apps/mobile/html/Web.bundle/site/plaineditor.html+++ b/apps/mobile/html/Web.bundle/site/plaineditor.html@@ -177,8 +177,9 @@<div placeholder="Write something..." contenteditable="true" class="htmldiff_div"></div>- <script src="./listeners.js"></script><script src="./constants.js"></script>+ <script src="./listeners.js"></script>+<script>function reactNativeEventHandler(type, value) {if (window.ReactNativeWebView) {diff --git a/apps/mobile/src/components/NoteHistory/preview.js b/apps/mobile/src/components/NoteHistory/preview.jsindex 5239e7b10..835fb270d 100644--- a/apps/mobile/src/components/NoteHistory/preview.js+++ b/apps/mobile/src/components/NoteHistory/preview.js@@ -9,6 +9,7 @@ import {db} from '../../utils/database';import {eCloseProgressDialog, eOnLoadNote} from '../../utils/Events';import {normalize} from '../../utils/SizeUtils';import {getNote, sourceUri} from '../../views/Editor/Functions';+import tiny from '../../views/Editor/tiny/tiny';import { ActionIcon } from '../ActionIcon';import {Button} from '../Button';import DialogHeader from '../Dialog/dialog-header';@@ -25,11 +26,20 @@ export default function NotePreview({session, content}) {'placeholder.svg');- console.log(preview, 'preview');- postMessage('htmldiff', preview?.data);let theme = {...colors};theme.factor = normalize(1);- postMessage('theme', JSON.stringify(theme));++ webviewRef.current?.injectJavaScript(`+ (function() {+ let v = ${JSON.stringify(theme)}+ if (pageTheme) {+ pageTheme.colors = v;+ }+ setTheme()+ })();+ `);++ postMessage('htmldiff', preview?.data);};function postMessage(type, value = null) {@@ -99,8 +109,10 @@ export default function NotePreview({session, content}) {height: '100%',backgroundColor: 'transparent'}}+ onError={e => {+ console.log(e);+ }}nestedScrollEnabled- cacheMode="LOAD_DEFAULT"domStorageEnabled={true}scrollEnabled={true}bounces={false}@@ -111,9 +123,11 @@ export default function NotePreview({session, content}) {allowUniversalAccessFromFileURLs={true}originWhitelist={['*']}javaScriptEnabled={true}+ cacheMode="LOAD_DEFAULT"cacheEnabled={true}source={{- uri: sourceUri + 'plaineditor.html'+ uri:"http://192.168.10.13:3000/plaineditor.html"+ //uri: sourceUri + 'plaineditor.html'}}/>) : (diff --git a/apps/mobile/src/services/Exporter.js b/apps/mobile/src/services/Exporter.jsindex d5bd4182f..b3ba4210e 100644--- a/apps/mobile/src/services/Exporter.js+++ b/apps/mobile/src/services/Exporter.js@@ -43,45 +43,184 @@ iframe {max-width:100% !important;background-color:transparent !important;}-table {- display: block !important;- max-width:100% !important;- width:100% !important;- table-layout:fixed;- border-width:0;++.tox-checklist > li,+.checklist > li {+ list-style: none;+ margin: 0.25em 0;+}++.tox-checklist > li::before,+.checklist > li::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: 1.1em;+ margin-left: -2.5em;+ margin-top: 0.125em;+ position: absolute;+ width: 1.5em;+ padding-left: 1em;+}++.tox-checklist li.tox-checklist--checked::before,+.checklist li.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%23008837%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');+}++.tox-checklist li.tox-checklist--checked,+.checklist li.checked {+ color:gray+}++[dir="rtl"] .tox-checklist > li::before,+[dir="rtl"] .checklist > li::before {+ margin-left: 0;+ margin-right: -1.5em;+}+++++/* TABLE */++.mce-content-body table {+ table-layout: fixed;+ border-collapse: separate !important;+ border-spacing: 0px;+ border: none !important;+ border-radius: 5px;+ font-size: 14px;+ min-width: 100% !important;+}++tr td,+tr th {+ padding: 5px !important;+ border: 1px solid #e8e8e8 !important;+}++thead tr td,+tbody tr td,+thead tr th,+tbody tr th {+ border-left: none !important;+ border-top: none !important;}-td {- padding:5px;- border-width:0.5px;- border-style:solid;++tfoot tr td,+tfoot tr th, {+ border-left: none !important;+}++table caption,+thead td {+ border-bottom: 1px solid #e8e8e8 !important;+}++tfoot td {+ border-top: 1px solid #e8e8e8 !important;+}++.mce-content-body td:last-child {+ border-right: none !important;+}++.mce-content-body tbody tr:last-child td {+ border-bottom: none !important;+}++.mce-content-body tr:nth-child(even) {+ background-color: #f7f7f7;+}++table thead {+ font-weight: bold !important;+}++.mce-content-body .table-container {+ border: 1px solid #E8E8E8 !important;+ border-radius: 5px;+ overflow-x: auto;+ max-width: 100%;}td,th {- min-width: 120px !important;+ min-width:100px !important;}-td>*,-th>* {+.mce-content-body td > *,+.mce-content-body th > * {margin: 0 !important;}-td>*+*,-th>*+* {+.mce-content-body td > * + *,+.mce-content-body th > * + * {margin-top: 0.75em !important;}-tr:nth-child(even) {- background-color: "#f0f0f0"+.mce-content-body td[data-mce-selected]::after,+.mce-content-body th[data-mce-selected]::after {+ background-color: #00883712 !important;+ border: 1px solid #00883712 !important;+ bottom: -1px;+ content: "";+ left: -1px;+ mix-blend-mode: multiply;+ position: absolute;+ right: -1px;+ top: -1px;}-td,-th {- padding: 5px !important;- border: 1px solid #DCDCDC !important;- border-left: none !important;- border-top: none !important;+.mce-content-body table td:hover {+ background-color: #00883712;+}++.mce-content-body table[data-mce-selected] tr[data-mce-active] {+ background-color: #00883712;+ /* color: var(--static); */}++.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ td:not([data-mce-active]),+.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ th:not([data-mce-active]) {+ border-bottom: 1px solid ${'#008837' + 'B3'} !important;+ border-top: 1px solid ${'#008837' + 'B3'} !important;+}++.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ td:not([data-mce-active]):first-child,+.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ th:not([data-mce-active]):first-child {+ border-left: 1px solid ${'#008837' + 'B3'} !important;+}++.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ td:not([data-mce-active]):last-child,+.mce-content-body+ table[data-mce-selected]+ tr[data-mce-active]+ th:not([data-mce-active]):last-child {+ border-right: 1px solid ${'#008837' + 'B3'} !important;+}++.mce-content-body table[data-mce-selected] td[data-mce-active],+.mce-content-body table[data-mce-selected] th[data-mce-active] {+ border: 2px solid ${'#008837' + 'B3'} !important;+ background-color: #00883712;+}+</style>`;async function saveToPDF(note) {diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.jsindex 1f61d6ccc..1e36beb56 100755--- a/apps/mobile/src/views/Editor/index.js+++ b/apps/mobile/src/views/Editor/index.js@@ -109,7 +109,7 @@ const Editor = React.memo((function() {const func = function() {setTimeout(function() {- if (tinymce) {+ if (globalThis.tinymce) {init_tiny("calc(100vh - 55px)");} else {console.log('tinymce is not ready');@@ -136,8 +136,8 @@ const Editor = React.memo(allowFileAccessFromFileURLs={true}allowUniversalAccessFromFileURLs={true}originWhitelist={['*']}- source={source}- //source={{uri: 'http://192.168.10.13:3000/index.html'}}+ //source={source}+ source={{uri: 'http://192.168.10.13:3000/index.html'}}style={style}autoManageStatusBarEnabled={false}onMessage={_onMessage}diff --git a/apps/mobile/src/views/Editor/tiny/tiny.js b/apps/mobile/src/views/Editor/tiny/tiny.jsindex 4ccc6d713..badd42b27 100644--- a/apps/mobile/src/views/Editor/tiny/tiny.js+++ b/apps/mobile/src/views/Editor/tiny/tiny.js@@ -20,12 +20,12 @@ window.blur();`;const removeMarkdown = `-if (tinymce && tinymce.activeEditor) {+if (globalThis.tinymce && tinymce.activeEditor) {tinymce.activeEditor.plugins.textpattern.setPatterns("")}`;const setMarkdown = `-if (tinymce && tinymce.activeEditor) {+if (globalThis.tinymce && tinymce.activeEditor) {tinymce.activeEditor.plugins.textpattern.setPatterns(markdownPatterns);}`;@@ -144,7 +144,7 @@ const updateTheme = value => `if (pageTheme) {pageTheme.colors = v;}- if (tinymce && tinymce.activeEditor) {+ if (globalThis.tinymce && tinymce.activeEditor) {setTheme();}