तक्ता
तक्ता तयार करण्यासाठी toolbar मधून rows आणि columns निवडा. cell मध्ये अनेक paragraphs ऐवजी line breaks ने content पुढे जाते, आणि Tab व Shift+Tab पुढील किंवा मागील cell मध्ये जातात.
rows किंवा columns जोडणे व काढणे, cells merge करणे आणि header cells toggle करणे निवडलेल्या cells भोवती कार्य करते. तक्ता sortable म्हणून जतन केल्यानंतर प्रकाशित दृश्यात column sorting वापरण्यासाठी nabi-note/viewer मधील attachViewer() जोडा. merged cells असलेले tables sort होत नाहीत.
विंग्ज
मूलभूत अक्षररूपअंतर
HTMLसंपादक लोड होत आहे…
JSONnabi-treeसंपादक लोड होत आहे…
स्थापित करा
npm install nabi-noteकोड
import {
createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
mountHints, watchSettle, taskListWing, tableWings, imageWing,
mountViewTools,
} from 'nabi-note'
const selected = [
taskListWing,
...tableWings,
imageWing,
]
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: 'mr' })
const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale: 'mr' }
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('table').build()CSS शैली
तक्त्याला .nabi-content table ने आणि cells ला .nabi-content :is(th, td) ने style करा. cell structure किंवा viewer ने घातलेले sort button बदलू नका.
css
.article-body table { inline-size: 100%; border-collapse: collapse; }
.article-body :is(th, td) { padding: .6rem .75rem; border: 1px solid var(--nabi-line); }
.article-body th { background: var(--nabi-soft); font-weight: 700; }
.article-body tr:nth-child(even) td { background: color-mix(in srgb, var(--nabi-soft) 45%, transparent); }viewer जोडलेला असल्यास .nabi-sort button ठेवा. cell position किंवा right padding सक्तीने override केल्यास ते sort button वर येऊ शकते.