글머리 목록
여러 항목을 순서 없이 나열하는 목록입니다. 빈 문단에서 - 뒤에 Space를 입력하거나 툴바에서 전환합니다. 선택한 문단도 한 번에 목록으로 묶을 수 있습니다.
목록 안에서는 Tab으로 한 단계 들여쓰고 Shift+Tab으로 내어씁니다. Enter는 다음 항목을 만들며, 비어 있는 항목에서 다시 Enter를 누르면 목록을 끝낼 수 있습니다.
wing
기본 서체높이
HTML에디터를 불러오는 중…
JSON나비트리에디터를 불러오는 중…
설치
npm install nabi-note코드
import {
createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
mountHints, watchSettle, headingWing, bulletListWing, orderedListWing,
mountViewTools,
} from 'nabi-note'
const selected = [
headingWing,
bulletListWing,
orderedListWing,
]
const { nabi, registry } = createNabiWith(selected)
const root = document.querySelector('.nabi')!
const content = document.querySelector('.nabi-content')!
// locale 이 글의 방향도 정한다 — 아랍어·우르두면 오른쪽에서 왼쪽으로 선다
mountSurface({ nabi, registry, root: content, locale: 'ko' })
const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale: 'ko' }
const toolbar = mountToolbar({ ...shared, root: document.querySelector('#toolbar')! })
const context = mountContextToolbar({ ...shared, root: document.querySelector('#context')! })
mountHints({ toolbar, context, root, surface: content })
// 미리보기·전체화면 두 단추 — 툴바 줄의 끝에 제 상자를 세워 앉는다
mountViewTools({ ...shared, root, container: document.querySelector('#toolbar')! })
// 값이 바뀔 때마다 — 여기에 당신의 코드를 건다
// nabi.onChange(() => user_callback(nabi.getHtml()))ts
const selected = wings().use('ul').build()