Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

public setText(selector: String, text: String)

편집할 DOM selector를 지정하여 text를 삽입 할 수 있는 API입니다.

...

API to insert text by designating DOM selector to edit.

  • Insertable DOM: <div>, <td>, <p>


Params: selector, text

NameTypeDescription
selectorstring편집할 DOM을 가져올 selectorSelector to load DOM to edit
textString삽입할 textText to insert


Example:

Code Block
languagejs
themeEmacs
window.editor.setText('#field', 'Filed 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');

...



Experiencing

Include Page
DEMO:DOM API
DEMO:DOM API