setText

Release 2.3.0+

setText(selector: String, text: String): void

Inserts text into a specific DOM element identified by selector.

Supported DOM elements: <div>, <td>, <p>.

Parameters

NameTypeDescription
selectorstringCSS selector for the DOM to write text to
textstringText to insert

Example

window.editor.setText('#field',     'Field Text');
window.editor.setText('#name',      'Name Text');
window.editor.setText('#birth',     'Birth day');
window.editor.setText('#address',   'Address');
window.editor.setText('#phone',     'Phone number');
window.editor.setText('#copyright', 'Copyright');