How to get content of Ckeditor & Fckeditor using Javascript
CKEDITOR:
To get content of ckeditor we will create object of ckeditor and then we will provide id of textarea that is replaced by ckeditor.
Syntax:
CKEDITOR.instances.textarea_id.getData();getData();
Where CKEDITOR.instances : gives all the instances of CKEDITOR;
textarea_id : it is ID of textarea that is containing data ;
getData() : return content of Ckeditor current instance.
FCKEDITOR:
To get content of Fckeditor we will create Instance of Fckeditor for textarea and then we will get data using GetHTML method.
Syntax :
FCKeditorAPI.GetInstance('textarea_id'). GetHTML();
Where textarea_id : it is ID of textarea that is containing data ;
GetHTML() : This function returns content of textarea with id textarea_id.
Comments
Post a Comment