@matrajs/vue

Vue 3 bindings for Matra — useEditor, useEditorState, useEditorFocus and EditorContent.
3,724
Install
npm install @matrajs/vue
Latest Version:1.1.8
Vue:3
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: nh-shohan

@matrajs/vue

Vue 3 bindings for Matra: useEditor, useEditorState, useEditorFocus and EditorContent.

npm i @matrajs/core @matrajs/vue
<script setup lang="ts">
import { starterKit } from '@matrajs/core'
import { EditorContent, useEditor, useEditorState } from '@matrajs/vue'

const editor = useEditor({ extensions: starterKit, content: '<p>Hello</p>' })
const isBold = useEditorState(editor, (e) => e.getHTML().includes('<strong>'))
</script>

<template>
  <button :aria-pressed="isBold" @mousedown.prevent="editor.commands.toggleBold()">
    Bold
  </button>
  <EditorContent :editor="editor" />
</template>

The editor is markRaw-ed on purpose: it is a mutable object with its own change events, and putting it in Vue's reactivity graph would trace every document node on every keystroke. Read from it with useEditorState.

MIT.

Related Packages

lexical-vue

An extensible Vue 3 web text-editor based on Lexical.

166,694 362
@juit/vue-tiny-editor

Juit Tiny Editor (for mentions!)

8,299 2
@mteditor/vue3

MtEditor 的 Vue 3 适配层:只做挂载、props 映射与事件透传的薄壳

996
@mteditor/vue2

MtEditor 的 Vue 2.7 适配层:Options API 薄壳,兼容 value/input 形式的 v-model

958
@gridigor/vue-lexical

Vue 3 bindings for the Lexical editor framework

3,797 1

Version History

Version Released Vue License
1.1.8 ^3.4.0 MIT
1.1.7 ^3.4.0 MIT
1.1.6 ^3.4.0 MIT
1.1.5 ^3.4.0 MIT
1.1.1 ^3.4.0 MIT