Sortierte Liste ​

Verwandeln Sie Elemente, bei denen die Reihenfolge wichtig ist, in eine nummerierte Liste. Geben Sie eine Zahl und einen Punkt ein, z. B. 1., gefolgt von einem Leerzeichen in einem leeren Absatz oder wechseln Sie ausgewählte Absätze über die Symbolleiste.

Die angezeigten Zahlen werden aus der Position der Elemente berechnet, sodass sie automatisch fortgesetzt werden, wenn Sie Elemente hinzufügen oder einrücken. Das Speichern einer benutzerdefinierten Startnummer und das Zählen ab dieser Zahl wird nicht unterstützt.

Enter erstellt den nächsten Eintrag, Shift+Enter fügt nur einen Zeilenumbruch im aktuellen Eintrag ein. Tab und Shift+Tab rücken ein und aus. Auch in Tabellenzellen hat das Einrücken der Liste Vorrang vor dem Wechsel zwischen Zellen.

Flügel
StandardschriftartAbstand
HTMLEditor wird geladen…
JSONnabi-treeEditor wird geladen…
Installation
npm install nabi-note
Code
import {
  createLocale, createNabiWith, mountSurface, mountToolbar,
  mountContextToolbar, mountHints, watchSettle, bulletListWing,
  orderedListWing, taskListWing, mountViewTools,
} from 'nabi-note'

const selected = [
  bulletListWing,
  orderedListWing,
  taskListWing,
]
const locale = createLocale('de')
const { nabi, registry } = createNabiWith(selected, { locale })

const root = document.querySelector('.nabi')!
const content = document.querySelector('.nabi-content')!

// The locale also sets the direction — Arabic and Urdu run right to left
mountSurface({ nabi, registry, root: content, locale })

const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale }
const toolbar = mountToolbar({ ...shared, root: document.querySelector('#toolbar')! })
const context = mountContextToolbar({ ...shared, root: document.querySelector('#context')! })
mountHints({ toolbar, context, root, surface: content })
// The preview and fullscreen buttons — they stand their own box at the end of the row
mountViewTools({ ...shared, root, container: document.querySelector('#toolbar')! })

// on every change — hook up your own code here
// nabi.onChange(() => user_callback(nabi.getHtml()))

// Call from your language selector. Content and editing history stay intact.
// locale.setLocale('ko')
ts
const selected = wings().use('ol').build()