CKEditor Samples » Inline Editing by Code

This sample is not maintained anymore. Check out its brand new version in CKEditor SDK.

This sample shows how to create an inline editor instance of CKEditor. It is created with a JavaScript call using the following code:

// This property tells CKEditor to not activate every element with contenteditable=true element.
CKEDITOR.disableAutoInline = true;

var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );

Note that editable in the code above is the id attribute of the <div> element to be converted into an inline instance.