CKEDITOR - Pre-Defined Text

1

Anyone have any idea where I can be putting a predefined text within the textarea? %

in the example below:

    
asked by anonymous 09.06.2018 / 05:21

1 answer

1
___ erkimt ___ CKEDITOR - Pre-Defined Text ______ qstntxt ___

Anyone have any idea where I can be putting a predefined text within the textarea %

in the example below:

    
_________azszpr305655

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);
    
___
09.06.2018 / 05:51