| Status |
|---|
| colour | Yellow |
|---|
| title | 릴리즈 2.17.0 이상 |
|---|
|
html을 삽입합니다.
캐럿이 있는 캐럿 상태인 경우 캐럿이 위치한 곳에 html이 삽입됩니다.
문단을 셀렉션한 경우 셀렉션한 영역에 셀렉션 한 경우 insertType 파라미터 값에 따라 html이 삽입됩니다.
Parameters:
| Name | Type | Description |
|---|
| actionName | String | 액션 이름 |
| html | String |
html| 삽입할 html을 설정합니다. |
| insertType | String | - html 삽입 유형을 설정합니다.
- 셀렉션 상태일 때 유효합니다.
- 삽입 유형은 아래와 같습니다.
- 'overwrite': 덮어쓰기
- 'before': 앞에 삽입
- 'after': 뒤에 삽입
|
| overwriteStyle | boolean | 이전 텍스트의 스타일을 덮어쓸 것인지 |
여부
Example:
| Code Block |
|---|
|
editor.execCommand('insertHTML', '<span>에디터</span>');
editor.execCommand('toggleListinsertHTML', '<span>에디터</span>', 'overwrite');
editor.execCommand('toggleListinsertHTML', '<span>에디터</span>', 'before');
editor.execCommand('toggleListinsertHTML', '<span>에디터</span>', 'after');
editor.execCommand('toggleListinsertHTML', '<span>에디터</span>', 'after', true); |
...