필드셋을 편집하는데 사용되는 API 모델입니다.
인자로 넘겨받은 HTML String으로 Element의 뒤쪽에 자식으로 추가합니다.
var fieldset = editor.getAPIModelById('id'); fieldset.append("<input type='radio' id='mothman' name='monster'><label for='mothman'>Mothman</label>"); |
인자로 넘겨받은 HTML String으로 Element의 앞쪽에 자식으로 추가합니다.
var fieldset = editor.getAPIModelById('id'); fieldset.prepend("<input type='radio' id='mothman' name='monster'><label for='mothman'>Mothman</label>"); |
Element 자신을 제거합니다.
var fieldset = editor.getAPIModelById('id'); fieldset.remove(); |
Element 자신을 인자로 넘겨받은 HTML String으로 교체합니다.
var fieldset = editor.getAPIModelById('id'); fieldset.replace('<p><span>Fieldset replaced</span></p>'); |
인자로 넘겨받은 HTML 문자열값을 Fieldset의 내부 HTML로 설정합니다.
var fieldset = editor.getAPIModelById('id'); fieldset.setHTML('<p><span>HTML를 추가합니다. 기존에 입력된 내용은 모두 지워집니다.</span></p>'); |
인자로 넘겨받은 Text 문자열값을 Fieldset의 내부 Text로 설정합니다.
var fieldset = editor.getAPIModelById('id'); fieldset.setText('텍스트입니다.'); |