Every extension

mathBlock

Node takes options 0.42 kB gzipped

A formula on a line of its own.

The same node as `mathInline` in every way but where it sits: a block, so `ctx.insert` splits the paragraph around it and `$$E=mc^2$$ ` typed at the start of a paragraph replaces the paragraph with it.

Adding it

import { createEditor, document, paragraph, text, mathBlock } from '@matrajs/core'

const editor = createEditor({
  extensions: [document, paragraph, text, mathBlock({ … })],
  element: document.querySelector('#editor'),
})

There is no separate package · mathBlock 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

Attributes

HTML

← All 81 extensions

Edit this page on GitHub