Standalone and CkEditor field
Standalone and CkEditor field
Hi,
I'm trying to insert a field type CkEditor in my standalone page, this works well except that modifications aren't be taken because "Enter" key isn't valid the modifcations (like with other field) because it made a carriage return.
How can i update the modifications made with a CkEditor field ?
Thanks.
This discussion has been closed.
Replies
You will need a submit button that calls the
submit()
method. This example shows how you can have a submit button.Allan
OK, so I've tried to put an event on the preClose or Close event of editor that check if it's a ckeditor fields for updating.
This work well when i'm putting value in variable test :
standalone.set(field,test)
but how can i get the data from the ckeditor ? i've try this but not working :
standalone.set(field,CKEDITOR.getData())
Best Regards.
To get the field value you should be able to use
field().val()
orval()
.Allan
Hi Allan.
Thanks for answer.
But I'm still can't get field value when i'm putting it on event preClose.
If I put a console log on the preClose, it return "Null", but if i call the value with a button event, the same code return the right value.
I try this :
Where I'm wrong ? i was thinking that preClose event still having the editor accessible and so the value of field too.
Best regards.
Hi Allan.
I finally found how, i've put the code in the event preBlur and call event submit next. This work well.
Event preClose and Close lose the value when calling it.
Thanks for your help.
Hi,
Thanks for the update. Great to hear you've got it working the way you need!
Regards,
Allan