하이퍼링크 편집
editor.execCommand를 통해 실행되는 하이퍼링크 관련 명령어.
명령어
command - deleteLink
캐럿 위치에서 링크를 제거합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('deleteLink');
command - insertLink
선택한 텍스트에 링크를 적용합니다. 캐럿만 있을 때(선택 없음), 제공된 텍스트 또는 URL을 링크로 삽입합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
url | string | 링크 URL |
text | string | 삽입할 텍스트 |
title | string | 링크 설명 (title 속성) |
target | string | 링크를 열 대상: _blank, _top, _parent, _self |
editor.execCommand('insertLink',
'http://www.synapeditor.com',
'Go to the Synap Editor homepage',
'Synap Editor homepage',
'_blank'
);
command - openLink
캐럿 위치에서 링크를 엽니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('openLink');
command - updateLink
주어진 id와 일치하는 링크를 업데이트합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
id | string | 링크 ID |
url | string | 링크 URL |
text | string | 새 텍스트 |
title | string | 링크 설명 (title 속성) |
target | string | 링크를 열 대상: _blank, _top, _parent, _self |
editor.execCommand('updateLink',
'se_287be74c-119f',
'http://www.synapeditor.com',
'Go to the Synap Editor homepage',
'Synap Editor homepage',
'_blank'
);