Rich text / foldkit-mixins-richtext
linkEditor
function · packages/mixins-richtext/src/link.ts:69
function linkEditor<Message>(): SlotView.SlotView<
typeof LinkEditorSlots,
LinkEditorInput<Message>,
Message
>The link editor as a slot view. Applying needs an address the URL policy accepts
(RichText.safeUrl), which is what it sends, and something to link: a range, or a caret
inside a link. Otherwise the apply button is disabled and Enter in the field does nothing.
The remove button is drawn only inside a link. Escape in the field sends closed.