setTextBySelectors
Release 2.3.0+
setTextBySelectors(datas: Array<{ selector: String, text: String }>): void
Inserts text into multiple DOM elements at once.
Supported DOM elements: <div>, <td>, <p>.
Parameters
| Name | Type | Description |
|---|---|---|
datas | Array | [{ selector: String, text: String }, ...] — selector and text for each target DOM |
Example
window.editor.setTextBySelectors([
{ selector: '#field', text: 'Field Text' },
{ selector: '#name', text: 'Name Text' },
{ selector: '#birth', text: 'Birth day' }
]);