VEditor for Vue

A Vue 3 component with `v-model` and a `ready` event, without a build step.

  • Tested: 3.5
  • Compatible code: 3.2+
  • PHP 8.1+
Vue application with the VEditor component and its v-model value shown below

Installation in 3 steps

  1. Install

    Vue 3.2+ is a peer dependency. The package contains no licence logic.

    terminal
    npm install @veditor.eu/vue
  2. Import

    The editor itself is loaded from your server (assets-url, by default the route of the Laravel or Symfony integration).

    JavaScript
    import { VEditor } from '@veditor.eu/vue';
  3. Use

    Options as in the plain editor; @ready gives you the editor API.

    Vue
    <VEditor
      v-model="html"
      name="content"
      :options="{ licenseKey: 'VED1.…' }"
      @ready="editor => …" />

What you get

Integration features for Vue 3, where you would expect them.

Full integration documentation

  • v-modelTwo-way binding of the HTML content; external changes replace the content.
  • Loaded onceThe editor modules and styles load on first use, once per page.
  • Editor APIThe ready event and an exposed editor() method.
  • Strict CSPWorks with render functions and .vue files without unsafe-eval.
  • 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.