Insert hyperlink to the selected text.

In caret status, the hyperlink is connected to the entered text or URL.


Parameters:

NameTypeDescription
actionNameStringURL of the hyperlinkerlink inserting API
urlString

URL of the hyperlink

textStringText to be entered
titleStringTooltip of the hyperlink
targetString

Target setting (_blank, _top, _parent, _self)


Example:

editor.execCommand('insertLink', 'http://www.synapeditor.com', 'Go to the Synap Editor homepage', 'Synap Editor', '_blank');