Every extension

taskList

Node 0.57 kB gzipped

A checklist.

The checkbox is real DOM rather than a `::before`, because a checklist people cannot tick with the mouse is a bulleted list with extra steps. It carries `contenteditable="false"` so the caret never lands inside it.

Adding it

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

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

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

Keys

HTML

Styles

This one needs a stylesheet to look right, and ships the minimum as a string rather than a file · nothing is loaded unless you load it.


          import { taskListCSS } from '@matrajs/core'

const style = document.createElement('style')
style.textContent = taskListCSS
document.head.append(style)
        

← All 81 extensions

Edit this page on GitHub