脚注 ​

通过正文中的编号和文末列表关联补充说明。

使用工具栏的脚注按钮输入内容,即可在光标处插入脚注。如果选中了文字,脚注会插入选区末尾,并保留所选文字。编号不会存储,而是按文档顺序自动生成。

点击正文编号可在属性栏编辑内容。使用删除工具,或在脚注旁按两次 Backspace 或 Delete,先选中再删除。下方列表为只读,没有脚注时会消失。

在预览和已连接 viewer 的发布页面中,将鼠标悬停在编号上,或点击、轻触编号即可查看内容。内容仅接受单行纯文本,以正文基础字号的 0.875 倍无衬线字体显示。HTML 按原样显示为文字。

翅膀
默认字体高度
HTML正在加载编辑器…
JSONnabi-tree正在加载编辑器…
安装
npm install nabi-note
代码
import {
  createLocale, createNabiWith, mountSurface, mountToolbar,
  mountContextToolbar, mountHints, watchSettle, highlightWing, linkWing,
  footnoteWing, mountViewTools,
} from 'nabi-note'

const selected = [
  highlightWing,
  linkWing,
  footnoteWing,
]
const locale = createLocale('zh')
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('fn').build()