Formulix documentation← Back to the site
Installation / Formulix 0.1.0

CKEditor 5

A plugin using widgets and editor model transactions.

Installation

Run npm run build:integrations and copy dist/integrations/ckeditor5/ into your application. To package sources and licences, use npm run package:integrations. Load formulix-ui.min.js before creating the editor and import index.js as ESM.

Use your application’s existing ckeditor5 installation; do not bundle another editor copy. The tested version and declared peer dependency is CKEditor 49.

Configuration

import Formulix from './formulix/index.js';
// Merge into your existing ClassicEditor configuration.
const configuration = {
  plugins: [ /* application's plugins, */ Formulix ],
  toolbar: ['formulixFormula', 'formulixConta', 'formulixGrafico', 'formulixQuimica'],
  formulix: {
    servidor: 'https://api.formulix.example', // PLACEHOLDER
    chave: 'YOUR_PUBLIC_KEY', // PLACEHOLDER
    idioma: 'en'
  }
};

Without an upload callback, the plugin uses FileRepository and your configured upload adapter. For custom uploads, pass upload: async blob => { /* upload PNG and return URL */ } in formulix. This describes the contract: implement authenticated upload and server-side PNG/size validation. Keep the API option names unchanged; idioma: 'en' selects English.

API and public key

Use the HTTPS API URL supplied by your operator and your account’s public key. Register the editor’s domain in the dashboard; registration also covers its subdomains. Example URLs and keys are placeholders, not available services.

Preview and insertion content is sent to the API. Use only the domain-bound public key in the browser, never administrator, SMTP or Mercado Pago credentials. See authentication, errors and limits and the privacy draft.

Use and persistence

Use the four buttons and double-click an item to edit it again. Save editor.getData(). Preserve data-formulix wrappers, MathML, tables and required data-* attributes in the server sanitizer. Changes and history use model transactions.

Known limits

Tested with CKEditor 49: all four types, save/reload, editing again, undo, sanitization and read-only mode. Review the host editor’s licence separately; this adapter is GPL-3.0-or-later.

The Word OMML/RTF clipboard path remains specific to TinyMCE. Feature parity in alpha adapters, simultaneous use of different languages, Firefox/WebKit and mobile use still need validation.