This commit is contained in:
the-djmaze
2022-12-06 15:56:46 +01:00
parent 4709e6fc25
commit b2e111fc14
2 changed files with 3 additions and 3 deletions

View File

@@ -641,8 +641,8 @@ export class HtmlEditor {
this.blurTrigger();
this.onModeChange?.(!this.isPlain());
});
onReady.forEach(fn => fn());
this.onReady = fn => fn();
onReady.forEach(fn => fn());
});
}
}

View File

@@ -81,8 +81,8 @@ Object.assign(ko.bindingHandlers, {
let editor = null;
const fValue = fValueAccessor(),
fUpdateEditorValue = () => fValue?.__editor?.setHtmlOrPlain(fValue()),
fUpdateKoValue = () => fValue?.__editor && fValue(fValue.__editor.getDataWithHtmlMark()),
fUpdateEditorValue = () => fValue.__editor?.setHtmlOrPlain(fValue()),
fUpdateKoValue = () => fValue.__editor && fValue(fValue.__editor.getDataWithHtmlMark()),
fOnReady = () => {
fValue.__editor = editor;
fUpdateEditorValue();