diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.html
index 4197e7611..f556d7d72 100644
--- a/docs/frontend_api/FrontendScriptApi.html
+++ b/docs/frontend_api/FrontendScriptApi.html
@@ -1240,6 +1240,143 @@
+
+
+
+
+
+
+
+ See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for a documentation on the returned instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CKEditor instance or null (e.g. if active note is not a text note)
+
+
+
+
+
Spell check
-
These options apply only for desktop builds, browsers will use their own native spell check.
+
These options apply only for desktop builds, browsers will use their own native spell check. App restart is required after change.
diff --git a/src/public/javascripts/services/frontend_script_api.js b/src/public/javascripts/services/frontend_script_api.js
index a141c8f19..1760e21c0 100644
--- a/src/public/javascripts/services/frontend_script_api.js
+++ b/src/public/javascripts/services/frontend_script_api.js
@@ -296,12 +296,28 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
*/
this.createNoteLink = linkService.createNoteLink;
+ /**
+ * Adds given text to the editor cursor
+ *
+ * @param {string} text - this must be clear text, HTML is not supported.
+ * @method
+ */
+ this.addTextToActiveTabEditor = linkService.addTextToEditor;
+
/**
* @method
* @returns {NoteFull} active note (loaded into right pane)
*/
this.getActiveTabNote = noteDetailService.getActiveTabNote;
+ /**
+ * See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for a documentation on the returned instance.
+ *
+ * @method
+ * @returns {Editor|null} CKEditor instance or null (e.g. if active note is not a text note)
+ */
+ this.getActiveTabTextEditor = noteDetailService.getActiveEditor;
+
/**
* @method
* @returns {Promise} returns note path of active note or null if there isn't active note
diff --git a/src/public/javascripts/services/spell_check.js b/src/public/javascripts/services/spell_check.js
index f75e33157..aee0f379c 100644
--- a/src/public/javascripts/services/spell_check.js
+++ b/src/public/javascripts/services/spell_check.js
@@ -3,15 +3,16 @@ import optionsService from "./options.js";
export async function initSpellCheck() {
const options = await optionsService.waitForOptions();
- if (!options.is('spellCheckEnabled')) {
- return;
- }
-
const {SpellCheckHandler, ContextMenuListener, ContextMenuBuilder} = require('electron-spellchecker');
const {remote, shell} = require('electron');
const spellCheckHandler = new SpellCheckHandler();
- spellCheckHandler.attachToInput();
+
+ // not fully disabling the spellcheck since we want to preserve the context menu
+ // this will just get rid of the "red squiggles"
+ if (options.is('spellCheckEnabled')) {
+ spellCheckHandler.attachToInput();
+ }
spellCheckHandler.switchLanguage(options.get('spellCheckLanguageCode'));
diff --git a/src/services/import/tar.js b/src/services/import/tar.js
index 49bedc41b..8b0b58ce1 100644
--- a/src/services/import/tar.js
+++ b/src/services/import/tar.js
@@ -147,7 +147,7 @@ async function importTar(taskContext, fileBuffer, importRootNote) {
continue;
}
- if (attr.type === 'relation' && ['internalLink', 'imageLink', 'relationMapLink'].includes(attr.name)) {
+ if (attr.type === 'relation' && ['internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'].includes(attr.name)) {
// these relations are created automatically and as such don't need to be duplicated in the import
continue;
}
diff --git a/src/services/notes.js b/src/services/notes.js
index 9eb23cb79..518b81e6c 100644
--- a/src/services/notes.js
+++ b/src/services/notes.js
@@ -242,6 +242,20 @@ function findInternalLinks(content, foundLinks) {
return content.replace(/href="[^"]*#root/g, 'href="#root');
}
+function findIncludeNoteLinks(content, foundLinks) {
+ const re = //g;
+ let match;
+
+ while (match = re.exec(content)) {
+ foundLinks.push({
+ name: 'includeNoteLink',
+ value: match[1]
+ });
+ }
+
+ return content;
+}
+
function findRelationMapLinks(content, foundLinks) {
const obj = JSON.parse(content);
@@ -263,10 +277,11 @@ async function saveLinks(note, content) {
}
const foundLinks = [];
-
+console.log("Scanning", content);
if (note.type === 'text') {
content = findImageLinks(content, foundLinks);
content = findInternalLinks(content, foundLinks);
+ content = findIncludeNoteLinks(content, foundLinks);
}
else if (note.type === 'relation-map') {
findRelationMapLinks(content, foundLinks);
diff --git a/src/views/dialogs/about.ejs b/src/views/dialogs/about.ejs
index aabb27221..1ce633e43 100644
--- a/src/views/dialogs/about.ejs
+++ b/src/views/dialogs/about.ejs
@@ -9,7 +9,7 @@