படம்
பட முகவரியைச் சேர்த்து அகலத்தையும் சீரமைப்பையும் மாற்றுகிறது. இயல்பாக http:, https: அல்லது அதே தளப் பாதைகள் மட்டுமே அனுமதிக்கப்படுகின்றன; புதிய படம் மையச் சீரமைப்பிலும் 60% அகலத்திலும் தொடங்கும்.
அகலம் நிர்ணயிக்கப்பட்ட நிலைகளில் மட்டுமே சேமிக்கப்படுகிறது; சீரமைப்பு படத்தைச் சுற்றியுள்ள பத்தியில் சேமிக்கப்படுகிறது. blob: மற்றும் data:image/... முன்னோட்டங்களைப் பயன்படுத்த, பட wing மற்றும் தொகுப்பி அமைப்பில் உள்ளூர் URL-களைத் தெளிவாக அனுமதிக்க வேண்டும். SVG data URL-கள் அனுமதிக்கப்படாது.
npm install nabi-noteimport {
createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
mountHints, watchSettle, tableWings, imageWing, youtubeWing,
mountViewTools,
} from 'nabi-note'
const selected = [
...tableWings,
imageWing,
youtubeWing,
]
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: 'ta' })
const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale: 'ta' }
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('img', {
allowLocalUrls: false,
}).build()இந்த wing முகவரியை ஆவணத்தில் சேர்ப்பதற்கானது; கோப்பைப் பரிமாறாது. கோப்பை சேவையகத்திற்கு அனுப்ப பதிவேற்ற wing ஐ இணைக்கவும்.
CSS பாணிகள்
படங்களை .nabi-content img மூலம் வடிவமைக்கலாம். சேமித்த அகலத்தையும் சீரமைப்பையும் அப்படியே வைத்துக்கொண்டு, எல்லை அல்லது நிழல் போன்ற தோற்றத்தை மட்டும் மாற்றுங்கள்.
.article-body img {
border-radius: 12px;
box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.dark .article-body img { box-shadow: 0 8px 24px rgb(0 0 0 / 35%); }max-inline-size, block-size, அகலம் மற்றும் சீரமைப்புக்கான அடிப்படை விதிகளைத் தக்கவையுங்கள். பட அளவு ஆவணத்தில் சேமிக்கப்படும் மதிப்பு என்பதால் CSS-ல் வலுக்கட்டாயமாக நிர்ணயித்தால் ஆசிரியர் தேர்ந்தெடுத்த அகலத்துடன் முரண்படலாம்.