Every extension
link
Parses a[href] · renders a.
Adding it
import { createEditor, document, paragraph, text, link } from '@matrajs/core'
const editor = createEditor({
extensions: [document, paragraph, text, link],
element: document.querySelector('#editor'),
})
There is no separate package · link is already in @matrajs/core, and an extension you do not import is not in your bundle. document, paragraph and text are the floor every document needs.
Commands
-
editor.commands.setLink() -
editor.commands.unsetLink()
Attributes
-
href -
target· defaults to"_blank" -
rel· defaults to"noopener noreferrer"
HTML
-
Parses
a[href] -
Renders
a