Anyone have any idea where I can be putting a predefined text within the textarea?
%
in the example below:
Anyone have any idea where I can be putting a predefined text within the textarea
%
in the example below:
You can preset a text simply adding it to the .setData()
, including HTML tags, because when the CKEditor renders it, the tags will also be applied:
<textarea id="editor"><b>texto em negrito</b></textarea>
Another way to input text is by plugin API, using %code% %
var pre_texto = "<b>texto em negrito</b>";
CKEDITOR.instances.editor.setData(pre_texto);