From bd82fdce7e8718ca145afe73d30d5b89d672a5c7 Mon Sep 17 00:00:00 2001 From: wongpratan Date: Fri, 27 Dec 2024 17:25:36 +0700 Subject: [PATCH] Fix load TinyMCE to textbox editor of the form component --- src/rootPages/Designer/editors/views/ABViewText.js | 5 +++++ .../Designer/ui_work_interface_workspace_editor_layout.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/rootPages/Designer/editors/views/ABViewText.js b/src/rootPages/Designer/editors/views/ABViewText.js index 60c72599..09e1ff5a 100644 --- a/src/rootPages/Designer/editors/views/ABViewText.js +++ b/src/rootPages/Designer/editors/views/ABViewText.js @@ -73,6 +73,11 @@ export default function (AB) { // in our editor, we provide accessLv = 2 } + async viewLoad(view) { + await this.AB.custom["tinymce-editor"].init(); + super.viewLoad(view); + } + onChange() { const ids = this.ids; const baseView = this.view; diff --git a/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js b/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js index 4d0d04d9..68e7f97d 100644 --- a/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js +++ b/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js @@ -124,7 +124,7 @@ export default function (AB) { * our interface with the details for this View. * @param {ABView} view current view instance. */ - viewLoad(view) { + async viewLoad(view) { // remove the current Editor if it exists. this.currentEditor?.detatch?.(); @@ -233,7 +233,7 @@ export default function (AB) { } editorComponent = new newEditor(view); // view.editorComponent(this.AB._App, "preview"); - editorComponent.viewLoad(view); + await editorComponent.viewLoad(view); $$(ids.editAreaContainer).define({ width: 0 }); $$(ids.editArea).define({ height: 0 }); webix.html.removeCss(