Every extension

mathInline

Node takes options 0.79 kB gzipped

A formula in the run of text.

Only the source is stored. It is rendered into the element by whatever the application supplies — the editor carries no typesetting library, and a document never depends on one: the HTML keeps the source as the element's text, so an export reads as `E=mc^2` with no script on the page at all.

An atom, so the caret steps over it and backspace takes the whole thing. `$E=mc^2$ ` typed into a paragraph becomes one; `setMath` rewrites the one the caret is on, inline or display.

Adding it

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

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

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