mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
some fixes for CKEditor
This commit is contained in:
@@ -82,12 +82,12 @@ const noteEditor = (function() {
|
||||
|
||||
function setNoteBackgroundIfProtected(note) {
|
||||
if (note.detail.is_protected) {
|
||||
$(".note-editable").addClass("protected");
|
||||
$("#note-detail").addClass("protected");
|
||||
protectButton.hide();
|
||||
unprotectButton.show();
|
||||
}
|
||||
else {
|
||||
$(".note-editable").removeClass("protected");
|
||||
$("#note-detail").removeClass("protected");
|
||||
protectButton.show();
|
||||
unprotectButton.hide();
|
||||
}
|
||||
@@ -126,9 +126,6 @@ const noteEditor = (function() {
|
||||
|
||||
noteTitleEl.val(currentNote.detail.note_title);
|
||||
|
||||
// Clear contents and remove all stored history. This is to prevent undo from going across notes
|
||||
//noteDetailEl.summernote('reset');
|
||||
|
||||
editor.setData(currentNote.detail.note_text);
|
||||
|
||||
noteChangeDisabled = false;
|
||||
@@ -142,6 +139,10 @@ const noteEditor = (function() {
|
||||
return await server.get('notes/' + noteId);
|
||||
}
|
||||
|
||||
function getEditor() {
|
||||
return editor;
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
noteTitleEl.on('input', () => {
|
||||
noteChanged();
|
||||
@@ -179,6 +180,7 @@ const noteEditor = (function() {
|
||||
loadNote,
|
||||
getCurrentNote,
|
||||
getCurrentNoteId,
|
||||
newNoteCreated
|
||||
newNoteCreated,
|
||||
getEditor
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user