Every extension
image
Parses img[src] · renders img.
Adding it
import { createEditor, document, paragraph, text, image } from '@matrajs/core'
const editor = createEditor({
extensions: [document, paragraph, text, image],
element: document.querySelector('#editor'),
})
There is no separate package · image 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.insertImage()
Attributes
-
src -
alt -
title
HTML
-
Parses
img[src] -
Renders
img