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
| Name | Type | Description |
|---|---|---|
selector | string | CSS selector for the DOM to write text to |
text | string | Text 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');