mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
fix inserting current timestamp into editor
This commit is contained in:
@@ -85,9 +85,11 @@ function addLinkToEditor(linkTitle, linkHref) {
|
||||
|
||||
function addTextToEditor(text) {
|
||||
const editor = noteDetailText.getEditor();
|
||||
const doc = editor.document;
|
||||
|
||||
doc.enqueueChanges(() => editor.data.insertText(text), doc.selection);
|
||||
editor.model.change(writer => {
|
||||
const insertPosition = editor.model.document.selection.getFirstPosition();
|
||||
writer.insertText(text, insertPosition);
|
||||
});
|
||||
}
|
||||
|
||||
ko.bindingHandlers.noteLink = {
|
||||
|
||||
Reference in New Issue
Block a user