1035
Views
6
Comments
[CKEditor] CKEditor: text does not show up in input field
Question
ckeditor
Web icon
Forge asset by CKEditor Team

Hi.


I encountered the following problem:


1) added 'save' button to the form where CKEditor is used.

2) Save button works well, I used 'submit' method on the save button

3) when i put save and refresh the page I cannot load data into Text Input Field to which CKEditor is connected. It is empty on the browse.

4) when checked in debugger it shows that the text is there, but I cannot see it on the browser.

5) when removing CKEditor from the input text component and leave it as an ordinary input field it works well, therefore I am quite sure that the issue is with CKEditor.


I would be very grateful for any suggestions on this one.

2019-09-17 09-11-00
João Pedro Abreu
Staff

When you say "Refresh the page" is that using AJAX refresh? I'm pretty sure CKEditor only loads text from its source input on the first load. If you want to refresh the text after an AJAX refresh you'll have to use JavaScript, like suggested in this stack overflow thread: https://stackoverflow.com/questions/3610010/how-do-i-set-a-value-in-ckeditor-with-javascript

UserImage.jpg
Lukasz Cybula

Hi João,

I do not perform ajax refresh. I've set the button to full 'submit'. 

I even made double sure that it refreshes the whole page: It saves all data necessary (including the text from the input field). After that it redirects to the same page and all the preperation, including data load to fields, are performed. Sadly, it does not work. 

Other than that: I will experiment with the resolution you pointed out - thank you very much for your reply.


Warm regards,

Lukasz Cybula

2022-09-30 21-28-30
Ricardo Sousa

The javascript logic of CKEditor requires that you have a TextArea, in Outsystems terms that means that it only works if you have an Input with more than 1 line.

UserImage.jpg
Wendy Tromp

Ricardo Sousa wrote:

The javascript logic of CKEditor requires that you have a TextArea, in Outsystems terms that means that it only works if you have an Input with more than 1 line.

Thanks!


2018-07-02 08-57-04
Russell Codd

Ricardo Sousa wrote:

The javascript logic of CKEditor requires that you have a TextArea, in Outsystems terms that means that it only works if you have an Input with more than 1 line.

Ricardo, this was such a simple fix for a problem I've been trying to work out for an hour. Thank you :)


UserImage.jpg
Alan Conway

I just encountered this problem and it was a race condition - the CKEditor block was initializing before the data came back, so even though the data was there in the variable behind the block, it didn't show. I updated the expression for the Visible property on a container around the block to the IsDataFetched property of the data action and it fixed my problem, ensuring the CKEditor isn't shown and initialized until the backing data for the variable is fetched.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.