New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@matrajs/vue

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matrajs/vue

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

latest
Source
npmnpm
Version
1.1.8
Version published
Weekly downloads
45
-93.9%
Maintainers
1
Weekly downloads
 
Created
Source

@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.

  • Source: https://github.com/amrelaco/matra

MIT.

Keywords

editor

FAQs

Package last updated on 14 Sep 2026

Related posts