CKEditor Sample — Replace Textarea Elements Using JavaScript Code

This sample shows how to automatically replace all <textarea> elements with a CKEditor instance by using a JavaScript call.

To replace a <textarea> element, place the following call at any point after the <textarea> element or inside a <script> element located in the <head> section of the page, in a window.onload event handler:

CKEDITOR.replace( 'textarea_id' );

Note that textarea_id in the code above is the id attribute of the <textarea> element to be replaced.

Some text