Text case

Installation, behavior and limitations of the text case plugin.

1.0.0-beta.6 · Local build · desktop

Installation

Factory: createTextCasePlugin(), id text-case. 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

Adds UPPERCASE, lowercase, Sentence case and camelCase for a selection or the whole document. Supported formatting remains intact and the transformation is one undo step. Source mode does not accept visual text transformations.

Removal and ownership

usePlugin returns a disposer; removePlugin('text-case') 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, createTextCasePlugin } from '@vitext-ru/editor';
const editor = new ViText('#editor', {
  preset: 'pro', language: 'en',
  plugins: [createTextCasePlugin()]
});
editor.usePlugin(createTextCasePlugin());
editor.executePluginCommand('text-case', 'upper');
editor.executePluginCommand('text-case', 'camel');

Search documentation

No results. Try different words.

All documentation