[CKEditor.Reactive] ReferenceError: CKEditor.Reactive OR is not defined Outsystems11

Forge Component
(1)
Published on 18 Feb (4 days ago) by Fábio Fantato
1 vote
Published on 18 Feb (4 days ago) by Fábio Fantato

Hi All

 It would be greate if someone can help on the below issue.


 We are getting the below error while using the CKEditor.Reactive(4) component(OutSystems11).



ReferenceError: CKEDITOR is not defined

    at https://hostname/MyApp/scripts/CKEditorReactive.controller.js?Qk6NmZAi1zQA+_atGvFfnw:356:18

    at Controller.e.safeExecuteJSNode (https://hostname/MyApp/scripts/OutSystems.js?rtZ3zI4kwkj_X7T0xT9+gQ:11:1005)

    at Controller.CKEditorReactiveController.default.setEditorData$Action (https://hostname/MyApp/scripts/CKEditorReactive.controller.js?Qk6NmZAi1zQA+_atGvFfnw:313:12)


Detail scenario is below.


1. We have screen which display the List of Pages created. And PageName is the link which takes user to CKEDITOR content page.



2. Open application first time CKEditor loads the page content successfully.    


--------------------------------------------


Problem.  ---------------


 When user go back Page List screen and click on another link to edit the content

 CKEDITOR doest not show the data and Text Editor goes disabled/uneditable.


Java Script Error message is below 


ReferenceError: CKEDITOR is not defined

    at https://hostname/MyApp/scripts/CKEditorReactive.controller.js?Qk6NmZAi1zQA+_atGvFfnw:356:18

    at Controller.e.safeExecuteJSNode (https://hostname/MyApp/scripts/OutSystems.js?rtZ3zI4kwkj_X7T0xT9+gQ:11:1005)

    at Controller.CKEditorReactiveController.default.setEditorData$Action (https://hostname/MyApp/scripts/CKEditorReactive.controller.js?Qk6NmZAi1zQA+_atGvFfnw:313:12)


Hi All,

I had the same problem.

To solve it i tried that:

  1. Copy the Client Action SetEditorData from CKEditor.Reactive to your current module and rename it SetEditorDataCustom
  2. Modify the javascript in that Client Action by adding a try catch block like that
    try {
        var objEditor1 = CKEDITOR.instances[$parameters.EditorId];
        objEditor1.setData($parameters.HTML);
    } catch(error){
        //do nothing
    }
  3. Add an OnAfterFetch event to your Aggregate and use your SetEditorDataCustom to refresh CKEditor


I think it's not a perfect solution, but it seem it's worked