Extensions
column
One column of a column list. Holds blocks, so a column can carry a list, a table or an image rather than only text.
1 · Install
One package for every extension · there is no @matrajs/column to install.
npm i @matrajs/core2 · Add it to the editor
Import it and put it in the extensions array. That array is the whole feature list:
what is not in it is not in your bundle and not in the document's schema.
import { createEditor, document, paragraph, text, column } from '@matrajs/core'
const editor = createEditor({
extensions: [document, paragraph, text, column],
element: document.querySelector('#editor'),
})
Already in columnsKit · if you spread that kit you have this extension
and adding it again is a duplicate the schema will reject.
3 · Use it
Nothing to call · this one works once it is in the array. One column of a column list. Holds blocks, so a column can carry a list, a table or an image rather than only text.
In the document
-
Reads
div[data-column]when HTML is pasted or loaded. -
Writes
divingetHTML()andrenderToHTML().