Sunday, December 19, 2010

Dynamic Text in CKeditor

I am not professional writer/blogger but I am feeling that I needs to share my experience with other developers so I can save their time.

In one of the project , I require to add dynamic text in CKeditor. I had used following code and it works well.

var the_ed=CKEDITOR.instances['mytextbox']
the_ed.setData('dynamic text');

In Above code, 'mytextbox' is my control name. CKEDITOR object will automatically created when we add ckeditor js file in our php code.

No comments:

Post a Comment