하이퍼링크 편집

editor.execCommand를 통해 실행되는 하이퍼링크 관련 명령어.

명령어


캐럿 위치에서 링크를 제거합니다.

이름타입설명
actionNamestring명령 이름
editor.execCommand('deleteLink');

선택한 텍스트에 링크를 적용합니다. 캐럿만 있을 때(선택 없음), 제공된 텍스트 또는 URL을 링크로 삽입합니다.

이름타입설명
actionNamestring명령 이름
urlstring링크 URL
textstring삽입할 텍스트
titlestring링크 설명 (title 속성)
targetstring링크를 열 대상: _blank, _top, _parent, _self
editor.execCommand('insertLink',
  'http://www.synapeditor.com',
  'Go to the Synap Editor homepage',
  'Synap Editor homepage',
  '_blank'
);

캐럿 위치에서 링크를 엽니다.

이름타입설명
actionNamestring명령 이름
editor.execCommand('openLink');

주어진 id와 일치하는 링크를 업데이트합니다.

이름타입설명
actionNamestring명령 이름
idstring링크 ID
urlstring링크 URL
textstring새 텍스트
titlestring링크 설명 (title 속성)
targetstring링크를 열 대상: _blank, _top, _parent, _self
editor.execCommand('updateLink',
  'se_287be74c-119f',
  'http://www.synapeditor.com',
  'Go to the Synap Editor homepage',
  'Synap Editor homepage',
  '_blank'
);