mirror of
https://github.com/zadam/trilium.git
synced 2025-12-23 08:39:57 +01:00
fixed "add date" for ckeditor
This commit is contained in:
@@ -70,6 +70,13 @@ const link = (function() {
|
||||
doc.enqueueChanges(() => editor.data.insertLink(linkTitle, linkHref), doc.selection);
|
||||
}
|
||||
|
||||
function addTextToEditor(text) {
|
||||
const editor = noteEditor.getEditor();
|
||||
const doc = editor.document;
|
||||
|
||||
doc.enqueueChanges(() => editor.data.insertText(text), doc.selection);
|
||||
}
|
||||
|
||||
// when click on link popup, in case of internal link, just go the the referenced note instead of default behavior
|
||||
// of opening the link in new window/tab
|
||||
$(document).on('click', "a[action='note']", goToInternalNote);
|
||||
@@ -80,6 +87,7 @@ const link = (function() {
|
||||
getNodePathFromLabel,
|
||||
getNotePathFromLink,
|
||||
createNoteLink,
|
||||
addLinkToEditor
|
||||
addLinkToEditor,
|
||||
addTextToEditor
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user