1
You can pre-define a text by simply adding it to textarea
, including HTML tags, because when Ckeditor renders it, tags will also be applied:
<textarea id="editor"><b>texto em negrito</b></textarea>
Another way to insert a text is through the plugin API, using .setData()
:
var pre_texto = "<b>texto em negrito</b>";
CKEDITOR.instances.editor.setData(pre_texto);
Within the
textarea
. Ex.:<textarea>texto pré definido</textarea>
– Sam
How did I not think of this before? Thanks!
– Jean Alves