Skip to content

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

fix codeblock and theme in simple editor

ammarahm-ede05d7392fc5a
diff --git a/apps/mobile/html/Web.bundle/site/constants.js b/apps/mobile/html/Web.bundle/site/constants.js
index df3709aa7..8531d20a7 100755
--- a/apps/mobile/html/Web.bundle/site/constants.js
+++ b/apps/mobile/html/Web.bundle/site/constants.js
@@ -77,7 +77,7 @@ function dark() {
document.getElementById('dark_sheet').removeAttribute('disabled');
document.getElementById('light_sheet').setAttribute('disabled');
}
-
+ if (!globalThis.tinymce) return;
if (!tinymce.activeEditor) return;
tinymce.activeEditor.dom.styleSheetLoader.unload(
'dist/skins/notesnook/content.min.css'
@@ -98,7 +98,7 @@ function light() {
document.getElementById('dark_sheet').setAttribute('disabled');
document.getElementById('light_sheet').removeAttribute('disabled');
}
-
+ if (!globalThis.tinymce) return;
if (!tinymce.activeEditor) return;
tinymce.activeEditor.dom.styleSheetLoader.unload(
'dist/skins/notesnook-dark/content.min.css'
@@ -114,20 +114,189 @@ function light() {
);
}
+const codeblock_theme_light = `
+
+
+.hljs {
+ color: #383a42;
+ background: #fafafa !important;
+ text-shadow: none !important;
+}
+
+.hljs-comment,
+.hljs-quote {
+ color: #a0a1a7;
+ font-style: italic !important;
+}
+
+.hljs-doctag,
+.hljs-keyword,
+.hljs-formula {
+ color: #a626a4 !important;
+}
+
+.hljs-section,
+.hljs-name,
+.hljs-selector-tag,
+.hljs-deletion,
+.hljs-subst {
+ color: #e45649 !important;
+}
+
+.hljs-literal {
+ color: #0184bb !important;
+}
+
+.hljs-string,
+.hljs-regexp,
+.hljs-addition,
+.hljs-attribute,
+.hljs-meta .hljs-string {
+ color: #50a14f !important;
+}
+
+.hljs-attr,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-type,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo,
+.hljs-number {
+ color: #986801 !important;
+}
+
+.hljs-symbol,
+.hljs-bullet,
+.hljs-link,
+.hljs-meta,
+.hljs-selector-id,
+.hljs-title {
+ color: #4078f2 !important;
+}
+
+.hljs-built_in,
+.hljs-title.class_,
+.hljs-class .hljs-title {
+ color: #c18401 !important;
+}
+
+.hljs-emphasis {
+ font-style: italic !important;
+}
+
+.hljs-strong {
+ font-weight: 600 !important;
+}
+
+.hljs-link {
+ text-decoration: underline !important;
+}
+
+.mce-content-body hr {
+ border-color: #b1b1b1 !important;
+}
+`;
+
+const codeblock_theme_dark = `
+
+
+.hljs {
+ color: #abb2bf !important;
+ background: #282c34 !important;
+ text-shadow: none !important;
+}
+
+.hljs-comment,
+.hljs-quote {
+ color: #5c6370 !important;
+ font-style: italic !important;
+}
+
+.hljs-doctag,
+.hljs-keyword,
+.hljs-formula {
+ color: #c678dd !important;
+}
+
+.hljs-section,
+.hljs-name,
+.hljs-selector-tag,
+.hljs-deletion,
+.hljs-subst {
+ color: #e06c75 !important;
+}
+
+.hljs-literal {
+ color: #56b6c2 !important;
+}
+
+.hljs-string,
+.hljs-regexp,
+.hljs-addition,
+.hljs-attribute,
+.hljs-meta .hljs-string {
+ color: #98c379 !important;
+}
+
+.hljs-attr,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-type,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo,
+.hljs-number {
+ color: #d19a66 !important;
+}
+
+.hljs-symbol,
+.hljs-bullet,
+.hljs-link,
+.hljs-meta,
+.hljs-selector-id,
+.hljs-title {
+ color: #61aeee !important;
+}
+
+.hljs-built_in,
+.hljs-title.class_,
+.hljs-class .hljs-title {
+ color: #e6c07b !important;
+}
+
+.hljs-emphasis {
+ font-style: italic !important;
+}
+
+.hljs-strong {
+ font-weight: 600 !important;
+}
+
+.hljs-link {
+ text-decoration: underline !important;
+}
+
+.mce-content-body hr {
+ border-color: #b1b1b1 !important;
+}
+
+`;
+
let styleElementDocument = null;
let styleElementEditorDocument = null;
function setTheme() {
+ if (globalThis.tinymce) {
+ if (pageTheme.colors.night) {
+ dark();
+ } else {
+ light();
+ }
- if (globalThis.tinymce) {
- if (pageTheme.colors.night) {
- dark();
- } else {
- light();
- }
- addStyle();
+ addStyle();
- let node2 = `
+ let node2 = `
.mce-content-body table[data-mce-selected], {
outline: 3px solid ${pageTheme.colors.shade} !important;
}
@@ -241,21 +410,20 @@ span.attachment em::before {
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"] {
+.mce-content-body code[data-mce-selected="inline-boundary"]:not(pre code),
+.hljs[data-mce-selected="inline-boundary"] {
background-color: ${pageTheme.colors.nav} !important;
}
-.mce-content-body code {
+.mce-content-body code:not(pre code),
+.hljs {
background-color: ${pageTheme.colors.nav} !important;
- border: 1px solid var(--border);
- border-radius: 5px;
- padding: 3px 5px 0px 5px;
-}
-
-code {
+ border: 1px solid ${pageTheme.colors.border} !important;
+ border-radius: 5px !important;
+ padding: 3px 5px 0px 5px !important;
font-family: ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono,
Menlo, monospace !important;
- font-size:10pt !important
+ font-size: 10pt !important;
}
.tox-checklist > li,
@@ -446,29 +614,45 @@ th {
`;
- if (tinymce && tinymce.activeEditor) {
- let editorHead =
- tinymce.activeEditor.contentDocument.getElementsByTagName('head')[0];
-
- if (!styleElementEditorDocument) {
- styleElementEditorDocument = document.createElement('style');
- styleElementEditorDocument.innerHTML = node2;
- editorHead.appendChild(styleElementEditorDocument);
+ if (pageTheme.colors.night) {
+ node2 = node2 + codeblock_theme_dark;
} else {
- styleElementEditorDocument.innerHTML = node2;
+ node2 = node2 + codeblock_theme_light;
}
- }
- }
+ if (tinymce && tinymce.activeEditor) {
+ if (!styleElementEditorDocument) {
+ styleElementEditorDocument = document.createElement('style');
+ let doc = tinymce.activeEditor.dom.doc;
+ styleElementEditorDocument.innerHTML = node2;
+ doc.head.appendChild(styleElementEditorDocument);
+ } else {
+ styleElementEditorDocument.innerHTML = node2;
+ }
+ }
+ }
let node = `
+ body {
+ color: ${pageTheme.colors.pri};
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ color: ${pageTheme.colors.heading}
+ }
+
#titleInput {
color:${pageTheme.colors.heading};
font-size:${25 * pageTheme.colors.factor};
}
#titleInput::-webkit-input-placeholder {
- color:${pageTheme.colors.icon}
+ color:${pageTheme.colors.icon};
}
.info-bar {
@@ -537,7 +721,7 @@ th {
.newtag {
padding-left: 20px;
padding-right: 20px;
- color:${pageTheme.colors.icon}
+ color:${pageTheme.colors.icon};
}
.tag svg,
@@ -555,7 +739,7 @@ th {
margin: 0px !important;
pointer-events: none;
user-select: none;
- color: ${pageTheme.colors.icon}
+ color: ${pageTheme.colors.icon};
}
#titlebar {
@@ -679,7 +863,7 @@ th {
.tox-checklist li.tox-checklist--checked,
.checklist li.checked {
- color:${pageTheme.colors.icon}
+ color:${pageTheme.colors.icon};
}
[dir="rtl"] .tox-checklist > li::before,
@@ -690,7 +874,7 @@ th {
/* TABLE */
-.mce-content-body table {
+table {
table-layout: fixed;
border-collapse: separate !important;
border-spacing: 0px;
@@ -728,15 +912,15 @@ tfoot td {
border-top: 1px solid ${pageTheme.colors.border} !important;
}
-.mce-content-body td:last-child {
+td:last-child {
border-right: none !important;
}
-.mce-content-body tbody tr:last-child td {
+tbody tr:last-child td {
border-bottom: none !important;
}
-.mce-content-body tr:nth-child(even) {
+tr:nth-child(even) {
background-color: ${pageTheme.colors.nav};
}
@@ -744,7 +928,7 @@ table thead {
font-weight: bold !important;
}
-.mce-content-body .table-container {
+.table-container {
border: 1px solid ${pageTheme.colors.border} !important;
border-radius: 5px;
overflow-x: auto;
@@ -756,18 +940,18 @@ th {
min-width:100px !important;
}
-.mce-content-body td > *,
-.mce-content-body th > * {
+td > *,
+th > * {
margin: 0 !important;
}
-.mce-content-body td > * + *,
-.mce-content-body th > * + * {
+td > * + *,
+th > * + * {
margin-top: 0.75em !important;
}
-.mce-content-body td[data-mce-selected]::after,
-.mce-content-body th[data-mce-selected]::after {
+td[data-mce-selected]::after,
+th[data-mce-selected]::after {
background-color: ${pageTheme.colors.shade} !important;
border: 1px solid ${pageTheme.colors.shade} !important;
bottom: -1px;
@@ -779,59 +963,68 @@ th {
top: -1px;
}
-.mce-content-body table td:hover {
+table td:hover {
background-color: ${pageTheme.colors.shade};
}
-.mce-content-body table[data-mce-selected] tr[data-mce-active] {
+table[data-mce-selected] tr[data-mce-active] {
background-color: ${pageTheme.colors.shade};
/* color: var(--static); */
}
-.mce-content-body
- table[data-mce-selected]
+table[data-mce-selected]
tr[data-mce-active]
td:not([data-mce-active]),
-.mce-content-body
- table[data-mce-selected]
+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]
+table[data-mce-selected]
tr[data-mce-active]
td:not([data-mce-active]):first-child,
-.mce-content-body
- table[data-mce-selected]
+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]
+table[data-mce-selected]
tr[data-mce-active]
td:not([data-mce-active]):last-child,
-.mce-content-body
- table[data-mce-selected]
+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] {
+
+
+table[data-mce-selected] td[data-mce-active],
+table[data-mce-selected] th[data-mce-active] {
border: 2px solid ${pageTheme.colors.accent + 'B3'} !important;
background-color: ${pageTheme.colors.shade};
}
-
-
-
- `;
+.hljs {
+ background-color: ${pageTheme.colors.nav} !important;
+ border: 1px solid ${pageTheme.colors.border} !important;
+ border-radius: 5px;
+ padding: 3px 5px 0px 5px;
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono,
+ Menlo, monospace !important;
+ font-size: 10pt !important;
+}
+
+`;
+
+ if (pageTheme.colors.night) {
+ node = node + codeblock_theme_dark;
+ } else {
+ node = node + codeblock_theme_light;
+ }
if (!styleElementDocument) {
styleElementDocument = document.createElement('style');
diff --git a/apps/mobile/html/Web.bundle/site/dist/skins/notesnook-dark/content.min.css b/apps/mobile/html/Web.bundle/site/dist/skins/notesnook-dark/content.min.css
index 9d81858f2..f9edb5916 100644
--- a/apps/mobile/html/Web.bundle/site/dist/skins/notesnook-dark/content.min.css
+++ b/apps/mobile/html/Web.bundle/site/dist/skins/notesnook-dark/content.min.css
@@ -769,99 +769,6 @@ pre {
margin-right: 1.5rem;
padding-right: 1rem;
}
-/*# sourceMappingURL=content.min.css.map */
-
-/*
-Atom One Dark by Daniel Gamage
-Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
-base: #282c34
-mono-1: #abb2bf
-mono-2: #818896
-mono-3: #5c6370
-hue-1: #56b6c2
-hue-2: #61aeee
-hue-3: #c678dd
-hue-4: #98c379
-hue-5: #e06c75
-hue-5-2: #be5046
-hue-6: #d19a66
-hue-6-2: #e6c07b
-*/
-
-.hljs {
- color: #abb2bf;
- background: #282c34;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #5c6370;
- font-style: italic;
-}
-
-.hljs-doctag,
-.hljs-keyword,
-.hljs-formula {
- color: #c678dd;
-}
-
-.hljs-section,
-.hljs-name,
-.hljs-selector-tag,
-.hljs-deletion,
-.hljs-subst {
- color: #e06c75;
-}
-
-.hljs-literal {
- color: #56b6c2;
-}
-
-.hljs-string,
-.hljs-regexp,
-.hljs-addition,
-.hljs-attribute,
-.hljs-meta .hljs-string {
- color: #98c379;
-}
-
-.hljs-attr,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-type,
-.hljs-selector-class,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-number {
- color: #d19a66;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link,
-.hljs-meta,
-.hljs-selector-id,
-.hljs-title {
- color: #61aeee;
-}
-
-.hljs-built_in,
-.hljs-title.class_,
-.hljs-class .hljs-title {
- color: #e6c07b;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: 600;
-}
-
-.hljs-link {
- text-decoration: underline;
-}
.mce-content-body hr {
border-color: #b1b1b1 !important;
diff --git a/apps/mobile/html/Web.bundle/site/dist/skins/notesnook/content.min.css b/apps/mobile/html/Web.bundle/site/dist/skins/notesnook/content.min.css
index 424c0129e..c97d32e7b 100644
--- a/apps/mobile/html/Web.bundle/site/dist/skins/notesnook/content.min.css
+++ b/apps/mobile/html/Web.bundle/site/dist/skins/notesnook/content.min.css
@@ -770,99 +770,6 @@ pre {
margin-right: 1.5rem;
padding-right: 1rem;
}
-/*# sourceMappingURL=content.min.css.map */
-
-/*
-Atom One Light by Daniel Gamage
-Original One Light Syntax theme from https://github.com/atom/one-light-syntax
-base: #fafafa
-mono-1: #383a42
-mono-2: #686b77
-mono-3: #a0a1a7
-hue-1: #0184bb
-hue-2: #4078f2
-hue-3: #a626a4
-hue-4: #50a14f
-hue-5: #e45649
-hue-5-2: #c91243
-hue-6: #986801
-hue-6-2: #c18401
-*/
-
-.hljs {
- color: #383a42;
- background: #fafafa;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #a0a1a7;
- font-style: italic;
-}
-
-.hljs-doctag,
-.hljs-keyword,
-.hljs-formula {
- color: #a626a4;
-}
-
-.hljs-section,
-.hljs-name,
-.hljs-selector-tag,
-.hljs-deletion,
-.hljs-subst {
- color: #e45649;
-}
-
-.hljs-literal {
- color: #0184bb;
-}
-
-.hljs-string,
-.hljs-regexp,
-.hljs-addition,
-.hljs-attribute,
-.hljs-meta .hljs-string {
- color: #50a14f;
-}
-
-.hljs-attr,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-type,
-.hljs-selector-class,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-number {
- color: #986801;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link,
-.hljs-meta,
-.hljs-selector-id,
-.hljs-title {
- color: #4078f2;
-}
-
-.hljs-built_in,
-.hljs-title.class_,
-.hljs-class .hljs-title {
- color: #c18401;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: 600;
-}
-
-.hljs-link {
- text-decoration: underline;
-}
.mce-content-body hr {
border-color: #b1b1b1 !important;
diff --git a/apps/mobile/src/components/MergeEditor/index.js b/apps/mobile/src/components/MergeEditor/index.js
index 4cefbc91c..e065d86ef 100644
--- a/apps/mobile/src/components/MergeEditor/index.js
+++ b/apps/mobile/src/components/MergeEditor/index.js
@@ -77,10 +77,22 @@ const MergeEditor = () => {
postMessage(primaryWebView, 'htmldiff', content.data);
let theme = {...colors};
theme.factor = normalize(1);
- postMessage(primaryWebView, 'theme', JSON.stringify(theme));
+
+ primaryWebView.current?.injectJavaScript(`
+ (function() {
+ let v = ${JSON.stringify(theme)}
+ if (pageTheme) {
+ pageTheme.colors = v;
+ }
+
+ setTheme();
+
+ })();
+ `);
};
const onSecondaryWebViewLoad = async () => {
+ if (!secondaryData) return;
let content = await db.content.insertPlaceholders(
secondaryData,
'placeholder.svg'
@@ -88,7 +100,15 @@ const MergeEditor = () => {
postMessage(secondaryWebView, 'htmldiff', content?.data);
let theme = {...colors};
theme.factor = normalize(1);
- postMessage(secondaryWebView, 'theme', JSON.stringify(theme));
+ secondaryWebView.current?.injectJavaScript(`
+ (function() {
+ let v = ${JSON.stringify(theme)}
+ if (pageTheme) {
+ pageTheme.colors = v;
+ }
+ setTheme();
+ })();
+ `);
};
function postMessage(webview, type, value = null) {
diff --git a/apps/mobile/src/services/Exporter.js b/apps/mobile/src/services/Exporter.js
index 07e6bdffa..7c871f209 100644
--- a/apps/mobile/src/services/Exporter.js
+++ b/apps/mobile/src/services/Exporter.js
@@ -33,9 +33,21 @@ img {
.img_float_none {
float:none;
}
+
body {
background-color:transparent !important;
+ color: #505050
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ color: #212121
}
+
pre.codeblock {
overflow-x:auto;
}
@@ -81,7 +93,7 @@ iframe {
/* TABLE */
-.mce-content-body table {
+table {
table-layout: fixed;
border-collapse: separate !important;
border-spacing: 0px;
@@ -101,10 +113,11 @@ thead tr td,
tbody tr td,
thead tr th,
tbody tr th {
- border-left: 1px solid #e8e8e8 !important;
- border-top: 1px solid #e8e8e8 !important;
+ border-left: none !important;
+ border-top: none !important;
}
+
tfoot tr td,
tfoot tr th, {
border-left: none !important;
@@ -119,15 +132,15 @@ tfoot td {
border-top: 1px solid #e8e8e8 !important;
}
-.mce-content-body td:last-child {
+td:last-child {
border-right: none !important;
}
-.mce-content-body tbody tr:last-child td {
+tbody tr:last-child td {
border-bottom: none !important;
}
-.mce-content-body tr:nth-child(even) {
+tr:nth-child(even) {
background-color: #f7f7f7;
}
@@ -135,7 +148,7 @@ table thead {
font-weight: bold !important;
}
-.mce-content-body .table-container {
+.table-container {
border: 1px solid #E8E8E8 !important;
border-radius: 5px;
overflow-x: auto;
@@ -147,18 +160,18 @@ th {
min-width:100px !important;
}
-.mce-content-body td > *,
-.mce-content-body th > * {
+td > *,
+th > * {
margin: 0 !important;
}
-.mce-content-body td > * + *,
-.mce-content-body th > * + * {
+td > * + *,
+th > * + * {
margin-top: 0.75em !important;
}
-.mce-content-body td[data-mce-selected]::after,
-.mce-content-body th[data-mce-selected]::after {
+td[data-mce-selected]::after,
+th[data-mce-selected]::after {
background-color: #00883712 !important;
border: 1px solid #00883712 !important;
bottom: -1px;
@@ -170,11 +183,11 @@ th {
top: -1px;
}
-.mce-content-body table td:hover {
+table td:hover {
background-color: #00883712;
}
-.mce-content-body table[data-mce-selected] tr[data-mce-active] {
+table[data-mce-selected] tr[data-mce-active] {
background-color: #00883712;
/* color: var(--static); */
}
@@ -213,12 +226,97 @@ th {
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] {
+table[data-mce-selected] td[data-mce-active],
+table[data-mce-selected] th[data-mce-active] {
border: 2px solid ${'#008837' + 'B3'} !important;
background-color: #00883712;
}
+.hljs {
+ color: #383a42;
+ background: #fafafa;
+ border:1px solid #e8e8e8;
+ border-radius: 5px;
+ padding: 3px 5px 0px 5px;
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono,
+ Menlo, monospace !important;
+ font-size: 10pt !important;
+}
+
+.hljs-comment,
+.hljs-quote {
+ color: #a0a1a7;
+ font-style: italic;
+}
+
+.hljs-doctag,
+.hljs-keyword,
+.hljs-formula {
+ color: #a626a4;
+}
+
+.hljs-section,
+.hljs-name,
+.hljs-selector-tag,
+.hljs-deletion,
+.hljs-subst {
+ color: #e45649;
+}
+
+.hljs-literal {
+ color: #0184bb;
+}
+
+.hljs-string,
+.hljs-regexp,
+.hljs-addition,
+.hljs-attribute,
+.hljs-meta .hljs-string {
+ color: #50a14f;
+}
+
+.hljs-attr,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-type,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo,
+.hljs-number {
+ color: #986801;
+}
+
+.hljs-symbol,
+.hljs-bullet,
+.hljs-link,
+.hljs-meta,
+.hljs-selector-id,
+.hljs-title {
+ color: #4078f2;
+}
+
+.hljs-built_in,
+.hljs-title.class_,
+.hljs-class .hljs-title {
+ color: #c18401;
+}
+
+.hljs-emphasis {
+ font-style: italic;
+}
+
+.hljs-strong {
+ font-weight: 600;
+}
+
+.hljs-link {
+ text-decoration: underline;
+}
+
+hr {
+ border-color: #b1b1b1 !important;
+}
+
</style>`;
async function saveToPDF(note) {
diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.js
index b0bf6cdc4..144940546 100755
--- a/apps/mobile/src/views/Editor/index.js
+++ b/apps/mobile/src/views/Editor/index.js
@@ -135,7 +135,10 @@ const Editor = React.memo(
allowFileAccessFromFileURLs={true}
allowUniversalAccessFromFileURLs={true}
originWhitelist={['*']}
- source={source}
+ source={{
+ uri:"http://192.168.10.2:3000/index.html"
+ }}
+ //source={source}
style={style}
autoManageStatusBarEnabled={false}
onMessage={_onMessage}
diff --git a/apps/mobile/src/views/Settings/functions.js b/apps/mobile/src/views/Settings/functions.js
index 5b9fe9234..1969644d2 100644
--- a/apps/mobile/src/views/Settings/functions.js
+++ b/apps/mobile/src/views/Settings/functions.js
@@ -3,7 +3,13 @@ import {ToastEvent} from '../../services/EventManager';
import {db} from '../../utils/database';
import {sleep} from '../../utils/TimeUtils';
-export async function verifyUser(context, onsuccess,disableBackdropClosing,onclose,closeText) {
+export async function verifyUser(
+ context,
+ onsuccess,
+ disableBackdropClosing,
+ onclose,
+ closeText
+) {
presentDialog({
context: context,
title: "Verify it's you",
@@ -12,9 +18,9 @@ export async function verifyUser(context, onsuccess,disableBackdropClosing,onclo
paragraph: 'Please enter your account password',
positiveText: 'Verify',
secureTextEntry: true,
- disableBackdropClosing:disableBackdropClosing,
- onClose:onclose,
- negativeText:closeText || "Cancel",
+ disableBackdropClosing: disableBackdropClosing,
+ onClose: onclose,
+ negativeText: closeText || 'Cancel',
positivePress: async value => {
try {
let verified = await db.user.verifyPassword(value);