Typography

Installation, behavior and limitations of the typography plugin.

1.0.0-beta.6 · Local build · desktop

Installation

Factory: createTypographyPlugin(), id typography. Requires preset pro and enabled features.plugins. Use a constructor plugins array or usePlugin on an existing editor; do not install the same id twice. In the script build the factory belongs to the ViText namespace; workspace ESM imports are shown below.

Behavior and limitations

Applies typographic quotes, dashes and non-breaking spaces to a selection or the document. It preserves formatting, skips code/links and groups edits into one undo operation. This is a focused helper, not a universal language rules engine.

Removal and ownership

usePlugin returns a disposer; removePlugin('typography') removes the same plugin. Destroy automatically revokes its managed commands, subscriptions and UI. The document stays intact. Application-owned requests still need application cleanup. Plugin contract, methods.

import { ViText, createTypographyPlugin } from '@vitext-ru/editor';
const editor = new ViText('#editor', {
  preset: 'pro', language: 'en',
  plugins: [createTypographyPlugin()]
});
editor.usePlugin(createTypographyPlugin());
editor.executePluginCommand('typography', 'apply');

Search documentation

No results. Try different words.

All documentation