NABI NOTE
নথি

YouTube

YouTube ভিডিওর URL বা ভিডিও ID গ্রহণ করে সেটিকে এমবেড ব্লকে বদলায়। নথিতে পুরো URL নয়, কেবল ১১ অক্ষরের ভিডিও ID ও প্রস্থ সংরক্ষিত হয়; নতুন ভিডিও শুরু হয় কেন্দ্রে ৭০% প্রস্থে।

প্রস্থ নির্দিষ্ট ধাপে বেছে নেওয়া হয় এবং ভিডিওকে ঘিরে থাকা অনুচ্ছেদে সারিবদ্ধতা সংরক্ষিত থাকে। এডিটরে প্রথম ক্লিক ভিডিও নির্বাচন করে; নির্বাচিত হওয়ার পর আবার ক্লিক করলে চালানো যায়। ঠিকানা বদলাতে ভিডিওটি মুছে নতুনটি ঢোকান।

ডানা
ডিফল্ট ফন্টউচ্চতা
HTMLসম্পাদক লোড হচ্ছে…
JSONnabi-treeসম্পাদক লোড হচ্ছে…
ইনস্টল
npm install nabi-note
কোড
import {
  createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
  mountHints, watchSettle, codeWing, imageWing, youtubeWing,
  mountViewTools,
} from 'nabi-note'

const selected = [
  codeWing,
  imageWing,
  youtubeWing,
]
const { nabi, registry } = createNabiWith(selected)

// Bring your own highlighter (Prism, highlight.js, Shiki, …) — the wing stays as it is
// and only the attach is swapped (`makeCodeAttach` ships from the same door)
// { ...codeWing, attach: makeCodeAttach({ highlight: (source, lang) => [{ text: source }] }) }

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()))
ts
const selected = wings().use('youtube').build()

CSS শৈলী

ভিডিওর সীমানা বা কোণ বদলাতে .nabi-content iframe ব্যবহার করুন। সংরক্ষিত প্রস্থ বা সারিবদ্ধতা বদলাবেন না।

css
.article-body iframe {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgb(0 0 0 / 16%);
}

সঠিক আকার ধরে রাখতে প্যাকেজ aspect-ratio, প্রস্থ ও সারিবদ্ধতার margin ব্যবহার করে; তাই এগুলো override করবেন না।