Microsoft
Software
Hardware
Network
Question : CKEditor: How to update textarea using javascript?
I've been through the CKEditor docs and the EE area but still can't find a solution to what I believe is a very simple problem: I am using CKEditor on a textarea, but wish to be able to manually clear out the textarea with javascript when the user presses a 'clear this field' button.
I set up a javascript handler for the button click, but I can't seem to clear the field out.
In the older FCKEditor code I could just use code like this:
document.myform.artistbio.
value="";
CKEDITOR.updateContent("ar
tistbio");
But the updateContent() is not in CKEditor (or at least I am not invoking it correctly?)
How can I call the CKEditor to clear out this field from javascript?
Thanks experts!
Answer : CKEditor: How to update textarea using javascript?
Its very simple
CKEDITOR.instances.yourEdi
torId.setD
ata('html to update')
just replace yourEditorId with your ckeditor ID, then call setData method and pass html you wish to replace with in it.
Random Solutions
Prevent ambiguous error
partions appear in Filesystem, that cannot be mounted (and were not created by me directly)
Google, Facebook, etc. Logo turns fuzzy after upload.
Ping remote user?
Creating new mailbox databases in Exchange 2010
Query needed to exclude data
Suspended VLAN
Trouble With High Volume Select Statments
How to get query cretaed by the prepare statement in PDO
Hyper Terminal v. 6.1 (Build 7600) running on Windows 7 Professional most often closes after clicking on File and then Open-How can I fix this?