VEditor for React
A controlled component with `value` and `onChange`, without JSX in the package and without a build step.
- Tested: 18
- Compatible code: 17+
- PHP 8.1+
Installation in 3 steps
-
Install
React is a peer dependency. The package contains no licence logic.
terminalnpm install @veditor.eu/react -
Import
The editor itself is loaded from your server (
assetsUrl, by default the route of the Laravel or Symfony integration).JavaScriptimport { VEditor } from '@veditor.eu/react'; -
Use
Options as in the plain editor;
onReadygives you the editor API.JSX<VEditor name="content" value={html} onChange={setHtml} options={{ licenseKey: 'VED1.…', ai: { url: '/veditor/ai', csrfToken } }} onReady={(editor) => console.log(editor.getStats())} />
What you get
Integration features for React, where you would expect them.
- Controlled componentChanging
valuefrom outside replaces the content, without an event loop. - Loaded onceThe editor modules and styles load on first use, once per page.
- Editor API
onReady(editor)withexecute(),getStats()and the rest of the API. - Bundler friendlyVite and webpack skip the runtime import, so the editor is not bundled twice.
- TypeScriptType declarations for the props, options and the editor instance.
Try it in your browser
The demo has the full toolbar and shows what the PHP sanitizer returns for your content.
All integrations
-
Laravel
Composer package Tested: 12 Compatible code: 11–13 -
Symfony
Symfony bundle Tested: 7.4 LTS Compatible code: 6.4–8 -
Yii2
Code to copy Tested: 2.0.55 -
PHP
Without a framework PHP 8.1+ -
React
npm package Tested: 18 Compatible code: 17+ -
Vue 3
npm package Tested: 3.5 Compatible code: 3.2+ -
Your file manager
Editor hooks
Names and trademarks belong to their owners. Their use does not imply partnership.