লিংক
Pilih teks lalu lampirkan alamat padanya. Jika Anda memasukkan alamat tanpa memilih teks, alamat itu sendiri dimasukkan sebagai teks tautan. Mengetik alamat http:// atau https:// lalu menekan Space atau Enter juga mengubahnya menjadi tautan.
Tautan hanya menyimpan http:, https:, dan path situs yang sama yang diawali . atau /. Alamat yang asalnya tidak dapat dikenali jelas, seperti javascript: atau //example.com, ditolak. Tautan lampiran yang dibuat oleh upload juga menyimpan informasi file dan tidak dapat dibuat manual seperti tautan biasa.
npm install nabi-noteimport {
createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
mountHints, watchSettle, subscriptWing, highlightWing, linkWing,
mountViewTools,
} from 'nabi-note'
const selected = [
subscriptWing,
highlightWing,
linkWing,
]
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: 'bn' })
const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale: 'bn' }
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()))const selected = wings().use('a').build()CSS স্টাইল
Beri gaya tautan biasa dengan .nabi-content a, dan tautan lampiran secara terpisah dengan .nabi-content a[data-nabi-file].
.article-body a:not([data-nabi-file]) {
color: var(--nabi-accent);
text-decoration-thickness: .08em;
text-underline-offset: .16em;
}
.article-body a[data-nabi-file] {
display: inline-flex;
gap: .35em;
padding: .25em .55em;
background: var(--nabi-soft);
}Bagian ::before dan ::after pada tautan lampiran dipakai untuk menampilkan ikon dan ekstensi file, jadi biasanya sebaiknya jangan mengganti atau menghapus content-nya.