From 0815df8fbffcce137d89347439b20e875aa94aa1 Mon Sep 17 00:00:00 2001 From: "pong.promrat" Date: Wed, 19 Nov 2025 14:40:56 +0700 Subject: [PATCH] *Fix editor of Text widget - https://github.com/CruGlobal/gsdev_planning/issues/619 https://github.com/CruGlobal/global-hr-update/issues/395 --- .../Designer/editors/views/ABViewText.js | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/rootPages/Designer/editors/views/ABViewText.js b/src/rootPages/Designer/editors/views/ABViewText.js index 09e1ff5..b56ddea 100644 --- a/src/rootPages/Designer/editors/views/ABViewText.js +++ b/src/rootPages/Designer/editors/views/ABViewText.js @@ -35,30 +35,34 @@ export default function (AB) { const baseView = this.view; return { - id: ids.component, - view: "tinymce-editor", - value: baseView.text, - config: { - plugins: [ - "advlist autolink lists link image charmap print preview anchor", - "searchreplace visualblocks code fullscreen", - "insertdatetime media table contextmenu paste imagetools wordcount", - ], - toolbar: - "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", - // menu: { - // file: { title: 'File', items: 'newdocument' }, - // edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall' }, - // format: { title: 'Format', items: 'formats | removeformat' } - // }, - init_instance_callback: (editor) => { - const eventHandlerOnChange = () => { - this.onChange(); - }; - - editor.on("Change", eventHandlerOnChange); + rows: [ + { + id: ids.component, + view: "tinymce-editor", + value: baseView.text, + config: { + plugins: [ + "advlist autolink lists link image charmap print preview anchor", + "searchreplace visualblocks code fullscreen", + "insertdatetime media table contextmenu paste imagetools wordcount", + ], + toolbar: + "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", + // menu: { + // file: { title: 'File', items: 'newdocument' }, + // edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall' }, + // format: { title: 'Format', items: 'formats | removeformat' } + // }, + init_instance_callback: (editor) => { + const eventHandlerOnChange = () => { + this.onChange(); + }; + + editor.on("Change", eventHandlerOnChange); + }, + }, }, - }, + ], }; }