எழுத்து அளவு
தேர்ந்தெடுத்த எழுத்தின் அளவு நிலையை மாற்றுகிறது. வரம்பு தேர்ந்தெடுக்கப்பட்டால் அந்த வரம்பிற்குப் பொருந்தும்; caret மட்டும் இருந்தால் தற்போதைய பத்தியின் எழுத்து அளவை மாற்றும். சேமித்த தரவில் px போன்ற விருப்ப மதிப்புகள் அல்ல, அனுமதிக்கப்பட்ட நிலைகள் மட்டுமே இருக்கும்.
npm install nabi-noteimport {
createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
mountHints, watchSettle, boldWing, italicWing, underlineWing,
strikeWing, typefaceWing, fontSizeWing, clearFormatWing,
mountViewTools,
} from 'nabi-note'
const selected = [
boldWing,
italicWing,
underlineWing,
strikeWing,
typefaceWing,
fontSizeWing,
clearFormatWing,
]
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('fs', {
values: ['sm', 'lg', 'xl'],
}).build()values ஐ விடுத்தால் xs, sm, lg, xl நிலைகள் பயன்படுத்தப்படும். பட்டியலைக் குறைத்தால் முந்தைய ஆவணங்களில் ஏற்கனவே இருந்த பிற நிலைகளும் ஏற்றும்போது அகற்றப்படும்.
CSS பாணிகள்
.nabi-content [data-nabi-size="xs"] போன்ற சேமித்த நிலைத் தேர்விகளால் அளவுகளை மாற்றலாம். ஆவணத்தில் இல்லாத விருப்ப நிலைகளை உருவாக்காதீர்கள்; பதிவு செய்த values க்குள் மட்டுமே CSS ஐச் சரிசெய்யவும்.
.article-body [data-nabi-size="xs"] { font-size: .78em; }
.article-body [data-nabi-size="sm"] { font-size: .9em; }
.article-body [data-nabi-size="lg"] { font-size: 1.3em; }
.article-body [data-nabi-size="xl"] { font-size: 1.65em; }நிலைகளுக்கு இடையிலான அளவு வேறுபாட்டை ஒரேபோல் வைத்தால், ஆசிரியர் தொகுப்பியில் தேர்ந்த பொருள் வெளியிடப்பட்ட ஆவணத்திலும் தக்கவைக்கப்படும்.