mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
upgrade CKEditor to 1.0 beta.2, fixes #93
This commit is contained in:
@@ -76,9 +76,11 @@ function goToLink(e) {
|
||||
|
||||
function addLinkToEditor(linkTitle, linkHref) {
|
||||
const editor = noteDetailText.getEditor();
|
||||
const doc = editor.document;
|
||||
|
||||
doc.enqueueChanges(() => editor.data.insertLink(linkTitle, linkHref), doc.selection);
|
||||
editor.model.change( writer => {
|
||||
const insertPosition = editor.model.document.selection.getFirstPosition();
|
||||
writer.insertText(linkTitle, { linkHref: linkHref }, insertPosition);
|
||||
});
|
||||
}
|
||||
|
||||
function addTextToEditor(text) {
|
||||
|
||||
Reference in New Issue
Block a user