Daidaitawa
Yana daidaita sakin layi na yanzu da sakin layin da kewayon zaɓi ya ratsa zuwa hagu, tsakiya, ko dama. Abubuwa da ke cikin sakin layi, kamar hoto, bidiyo, da tebur, ana daidaita su bisa sakin layin da ya kewaye abin.
Ana adana daidaitawa a matsayin sifa ta sakin layi, ba tsarin rubutu ba. An cire tubalan lamba daga daidaitawa domin shigar da layi tana da ma'ana a cikinsu.
Fuka-fukai
Nau’in rubutu na asaliTazara
HTMLAna loda edita…
JSONnabi-treeAna loda edita…
Sanya
npm install nabi-noteLamba
import {
createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
mountHints, watchSettle, alignWing, dropCapWing, mountViewTools,
} from 'nabi-note'
const selected = [
alignWing,
dropCapWing,
]
const { nabi, registry } = createNabiWith(selected)
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: 'ha' })
const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale: 'ha' }
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()))ts
const selected = wings().use('align').build()