user3720172
user3720172

Reputation: 39

set Content of a TinyMCE textarea via HTML

To set a content of a TinyMCE textarea we use this code in JavaScript :

tinymce.activeEditor.selection.setContent('<strong>Some contents</strong>');

but how can I set the content via html, without JavaScript ?? I tried to use

<textarea>Some Contents</textarea>

but this is not working. Thanks

Upvotes: 1

Views: 653

Answers (1)

kostans3k
kostans3k

Reputation: 467

If you define TinyMCE like that:

tinymce.init({selector:'textarea'});

that code should do what you need:

<textarea>Some Contents</textarea>

Example here: http://jsfiddle.net/n9djp4u2/

Upvotes: 1

Related Questions