Hi Erik,
First of all thank you for putting your time and effort in providing this nice example of how to integrate a small HTML Editor into BC!
I have been playing around with it and the example works fine as is. But afterI modified the CurrPage.Test.Load from hardcoded text to a text variable (or a field from a table) like:
usercontrol("TextEdit"; "TextEditor")
{
ApplicationArea = All;
trigger ControlReady()
begin
CurrPage.TextEdit.Init();
//CurrPage.TextEdit.Load('This is a <strong>BOLD</strong> statement!');
CurrPage.TextEdit.Load(NewText); //<< NewText is a global text variable
end;
the addin crashes with the following error (in Event Viewer):
"message": "Cannot read property 'setData' of undefined",
I have tried to find the cause. The only thing I found Googling around is that it could be a problem with Jquery but I have no idea what to do with this info and if this is true.
I also checked the history of your repository and noticed that you commited a change in the MainScript.js in the function Load:

After I reverted this change the CurrPage.TextEdit.Load worked fine with text coming from a variable.
Is there something I can do to prevent this error because there must be a good reason you decided to change Editor.setData instead of InputArea.value or was it just for the support of readonly?
Thank you in advance for your answer!
Hi Erik,
First of all thank you for putting your time and effort in providing this nice example of how to integrate a small HTML Editor into BC!
I have been playing around with it and the example works fine as is. But afterI modified the CurrPage.Test.Load from hardcoded text to a text variable (or a field from a table) like:
the addin crashes with the following error (in Event Viewer):
"message": "Cannot read property 'setData' of undefined",
I have tried to find the cause. The only thing I found Googling around is that it could be a problem with Jquery but I have no idea what to do with this info and if this is true.
I also checked the history of your repository and noticed that you commited a change in the MainScript.js in the function Load:

After I reverted this change the CurrPage.TextEdit.Load worked fine with text coming from a variable.
Is there something I can do to prevent this error because there must be a good reason you decided to change Editor.setData instead of InputArea.value or was it just for the support of readonly?
Thank you in advance for your answer!