Vizel API / core/src / applyVizelLinkEdit
Function: applyVizelLinkEdit()
ts
function applyVizelLinkEdit(
editor,
params,
canEmbed): string;Defined in: packages/core/src/builders/link-editor.ts:127
Apply the link-editor submission to the editor.
An empty (trimmed) URL removes the current link. When asEmbed is true and the embed extension is loaded (canEmbed), the link is removed and an embed is inserted instead. Otherwise the link mark is set with the appropriate target.
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
params | VizelLinkSubmitParams |
canEmbed | boolean |
Returns
string
The trimmed URL that was applied (empty string when removed).