Page tree

Versions Compared

Key

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

...

텍스트 필드, 텍스트 영역, 선택 박스와 같은 인라인 폼 요소를 삽입합니다.

parameters

NameTypeDescription
typestring

삽입할 인라인 폼 요소의 종류

  • text
  • number
  • email
  • password
  • hidden
  • radio
  • checkbox
radio
  • textarea
  • select
  • button
  • submit
  • reset
  • label
  • datalistInput
  • datalist


Code Block
languagejs
themeEmacs
editor.execCommand('insertFormRunElement', 'text'); // <input type="text"> 삽입
editor.execCommand('insertFormRunElement', 'number'); // <input type="number"> 삽입
editor.execCommand('insertFormRunElement', 'email'); // <input type="email"> 삽입
editor.execCommand('insertFormRunElement', 'password'); // <input type="password"> 삽입
editor.execCommand('insertFormRunElement', 'hidden'); // <input type="hidden"> 삽입
editor.execCommand('insertFormRunElement', 'radio'); // <input type="radio"> 삽입
editor.execCommand('insertFormRunElement', 'checkbox'); // <input type="checkbox"> 삽입
editor.execCommand('insertFormRunElement', 'textarea'); // <textarea> 삽입
editor.execCommand('insertFormRunElement', 'select'); // <select> 삽입
editor.execCommand('insertFormRunElement', 'button'); // <button type="button"> 삽입 
editor.execCommand('insertFormRunElement', 'submit'); // <button type="submit"> 삽입 
editor.execCommand('insertFormRunElement', 'reset'); // <button> 삽입  <button type="reset"> 삽입 
editor.execCommand('insertFormRunElement', 'label'); // <label> 삽입
editor.execCommand('insertFormRunElement', 'datalistInput'); // <Input list=""> 삽입
editor.execCommand('insertFormRunElement', 'datalist'); // <datalist> 삽입


insertFormBlockElement

폼, 필드셋과 같은 블럭 폼 요소를 삽입합니다.

parameters

NameTypeDescription
typestring

삽입할 블럭 폼 요소의 종류

  • form
  • fieldset


Code Block
languagejs
themeEmacs
editor.execCommand('insertFormBlockElement', 'form'); // <form> 삽입
editor.execCommand('insertFormBlockElement', 'fieldset'); // <fieldset> 삽입

...