చిత్రం

చిత్రం URLను చేర్చి దాని వెడల్పు, సమలేఖనాన్ని సర్దండి. డిఫాల్ట్‌గా చిరునామాలు http:, https:, లేదా అదే సైట్ మార్గాలకు పరిమితం; కొత్త చిత్రం 60% వెడల్పుతో మధ్యలో మొదలవుతుంది.

వెడల్పు నిర్ణీత దశలలోనే నిల్వ అవుతుంది; సమలేఖనం చిత్రాన్ని చుట్టిన పేరాలో నిల్వ అవుతుంది. blob: లేదా data:image/... ప్రివ్యూల కోసం చిత్రం వింగ్, ఎడిటర్ అసెంబ్లీలో స్థానిక URLలను స్పష్టంగా అనుమతించండి. SVG డేటా URLలు అనుమతించబడవు.

వింగ్స్
ప్రాథమిక అక్షరరూపంఆఫ్‌సెట్
HTMLఎడిటర్ లోడ్ అవుతోంది…
JSONnabi-treeఎడిటర్ లోడ్ అవుతోంది…
ఇన్‌స్టాల్
npm install nabi-note
కోడ్
import {
  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: 'te' })

const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale: 'te' }
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('img', {
  allowLocalUrls: false,
}).build()

ఈ వింగ్ పత్రంలో చిరునామాను మాత్రమే చేర్చుతుంది; ఫైళ్లను అప్‌లోడ్ చేయదు. ఫైళ్లను సర్వర్‌కు పంపడానికి అప్‌లోడ్ వింగ్ను కలపండి.

CSS శైలులు

.nabi-content imgతో చిత్రాలకు శైలి ఇవ్వండి. నిల్వ చేసిన వెడల్పు, సమలేఖనాన్ని అలాగే ఉంచి అంచులు లేదా నీడల వంటి దృశ్య వివరాలను మాత్రమే మార్చండి.

css
.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 వెడల్పును బలవంతం చేస్తే రచయిత ఎంచుకున్న వెడల్పుతో విరుద్ధమవుతుంది.