Function: setLink()
ts
function setLink(attrs): Command;Link the selection to href. With an empty selection inside a link, the whole link is updated; with an empty selection elsewhere, href is inserted as linked text. Returns false for URLs with a protocol that is not allowed. Requires the link extension.
Parameters
| Parameter | Type |
|---|---|
attrs | LinkAttrs |