ingredient_15939
ingredient_15939

Reputation: 3134

Get CKEditor contents without updating the textarea

Fairly new to CKEditor here. I'm aware that you need to call the updateElement() method for CKEditor to send the current editor content to the related textarea element. From there, you can call the getData() function to get the content. (Although I don't understand why there are two steps to get the editor content, instead of one.)

However, I want to get the current content directly from the editor, without changing the related textarea content. Is there a CKEditor method to achieve that, or is it a case of using jQuery to find the editor content?

Upvotes: 0

Views: 75

Answers (1)

Richard Deeming
Richard Deeming

Reputation: 31218

The getData method will return the raw HTML from the editor.

Upvotes: 1

Related Questions