mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
upgrade to ckeditor 12.0.0
This commit is contained in:
parent
7c404f03db
commit
610dd8a783
@ -11,6 +11,11 @@ async function show() {
|
|||||||
if (!textEditor) {
|
if (!textEditor) {
|
||||||
await libraryLoader.requireLibrary(libraryLoader.CKEDITOR);
|
await libraryLoader.requireLibrary(libraryLoader.CKEDITOR);
|
||||||
|
|
||||||
|
// CKEditor since version 12 needs the element to be visible before initialization. At the same time
|
||||||
|
// we want to avoid flicker - i.e. show editor only once everything is ready. That's why we have separate
|
||||||
|
// display of $component in both branches.
|
||||||
|
$component.show();
|
||||||
|
|
||||||
// textEditor might have been initialized during previous await so checking again
|
// textEditor might have been initialized during previous await so checking again
|
||||||
// looks like double initialization can freeze CKEditor pretty badly
|
// looks like double initialization can freeze CKEditor pretty badly
|
||||||
if (!textEditor) {
|
if (!textEditor) {
|
||||||
@ -22,9 +27,9 @@ async function show() {
|
|||||||
|
|
||||||
textEditor.isReadOnly = await isReadOnly();
|
textEditor.isReadOnly = await isReadOnly();
|
||||||
|
|
||||||
textEditor.setData(noteDetailService.getCurrentNote().noteContent.content);
|
|
||||||
|
|
||||||
$component.show();
|
$component.show();
|
||||||
|
|
||||||
|
textEditor.setData(noteDetailService.getCurrentNote().noteContent.content);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContent() {
|
function getContent() {
|
||||||
|
2
src/public/libraries/ckeditor/ckeditor.js
vendored
2
src/public/libraries/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user