@richkitjs/vue
@richkitjs/vue
Vue 3 bindings for @richkitjs/core.
Install
npm install @richkitjs/vue @richkitjs/core @richkitjs/starter-kit
Usage
<script setup lang="ts">
import { useEditor, EditorContent } from '@richkitjs/vue'
import { StarterKit } from '@richkitjs/starter-kit'
const editor = useEditor({
extensions: [...StarterKit],
content: '<p>Hello world</p>',
})
</script>
<template>
<button :disabled="!editor" @click="editor?.commands.toggleBold()">Bold</button>
<EditorContent :editor="editor" />
</template>
useEditor returns a shallow ref that re-triggers on every document and selection change, so computed state like active marks stays reactive.
To share the editor with deeply nested components, use provideEditor(editor) in the parent and useEditorContext() in descendants.
Docs
See the repository for full documentation.
License
MIT — free for any use, commercial or not.
Need DOCX, track changes, comments, AI or the Pro editors (Notion, Classic, Question…)? Those are RichKit Pro.
Related Packages
Vue block editor — official Vue 3 bindings for Blok, the headless Notion-like ri...
A complete rich text editor. Everything included, ready in minutes. Open-source...
Vue 2 wrapper for KodaEditor: a WYSIWYG rich-text editor that keeps Word and Exc...
Vue 3 wrapper for KodaEditor: a WYSIWYG rich-text editor that keeps Word and Exc...
Notion-like block editor for Vue 3 — supports a sticky format toolbar and/or a f...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.2.0 | ^3.3.0 | MIT | |
| 0.1.1 | ^3.3.0 | MIT | |
| 0.1.0 | ^3.3.0 | MIT |