Hakan Özdemir
Hakan Özdemir

Reputation: 23

Changing Default Text In CKEditor

I want change default text in CKEditor. If i can use PHP it would be simple. But i've use Jquery. So how can i change default text with using Jquery in CKEditor?

Thanks.

Upvotes: 2

Views: 6702

Answers (1)

steve_c
steve_c

Reputation: 6255

From your question, I understand it to be that you are wanting to change the text in the content area of the editor. If so, you can check this support page out on the ckeditor.com site.

ckEditor jQuery adapter

This requires an extra script to be added to your page, which enables a cleaner integration with jQuery.

To get/set the text inside the editor using jQuery, simply do this:

// Get the editor data.
var data = $( 'textarea.editor' ).val();
// Set the editor data.
$( 'textarea.editor' ).val( 'my new content' );

Upvotes: 1

Related Questions