Working example

Module integration

A real workspace ESM import with client-side mounting.

Local setup

Script integration is available through the browser archive. For ESM, use npm install @vitext-ru/editor@beta. The live example above runs in an isolated browser document; no document data is sent to a server.

Workflow

Edit the document and inspect its applied HTML. Tools use the same default configuration as the builder. The toolbar example intentionally moves selected tools into an explicit *** menu. The plugin example uses Pro, since plugins are unavailable in Simple/Base. The Markdown example awaits conversion before consuming HTML. Invalid source keeps the previous applied version.

import ViText from '@vitext-ru/editor';
import '@vitext-ru/editor/style.css';
const editor = new ViText('#editor', { language: 'en', preset: 'base',
  toolbarLayout: [
    'undo', 'redo', {type: 'separator'},
    'paragraph', 'h1', 'h2', 'h3', {type: 'separator'},
    'bold', 'italic', 'link', {type: 'separator'},
    'bulletList', 'orderedList', {type: 'separator'},
    'image', 'insertTable', {type: 'separator'}, 'html', 'fullscreen'
  ]
});
editor.destroy();

Integration and cleanup

Destroy the instance before unmounting, and await asynchronous imports/styles. Your application owns storage, authentication and uploads. Integration guide. Open separately. The browser archive includes a standalone script example.

← All examples

Search documentation

No results. Try different words.

All documentation