@bloklabs/vue
| Install | |
|---|---|
npm install @bloklabs/vue |
|
| Latest Version: | 1.16.1 |
| Vue: | 3 |
| License: | Apache-2.0 |
| Last Updated: | Oct 23, 2026 |
| Links: | GitHub · npm |
@bloklabs/vue
The Vue 3 block editor bindings for Blok. Blok is a headless, Notion-like rich text editor whose content is JSON blocks, not HTML.
Install
npm install @bloklabs/vue @bloklabs/core
@bloklabs/core and vue are peer dependencies.
Usage
<BlokEditor> is the all-in-one component: it mounts the editor, manages its lifecycle, and takes every editor config option as a prop.
<script setup lang="ts">
import { BlokEditor } from '@bloklabs/vue';
import { Header, Paragraph, List } from '@bloklabs/core/tools';
const tools = {
paragraph: Paragraph,
header: { class: Header, placeholder: 'Enter a heading' },
list: List,
};
</script>
<template>
<BlokEditor :tools="tools" />
</template>
Saving
The save emit fires with the latest content on every change, so you never have to call save() by hand.
<script setup lang="ts">
import { ref } from 'vue';
import { BlokEditor } from '@bloklabs/vue';
import type { OutputData } from '@bloklabs/core';
const data = ref<OutputData>();
</script>
<template>
<BlokEditor @save="(d: OutputData) => (data = d)" />
<pre>{{ data?.blocks }}</pre>
</template>
Also exported
useBlok(config, recreateKey?)— the composable behind the component. Returns aRef<Blok | null>.BlokContent— the mount-point element, if you want to wire the composable yourself.useBlocks(editor)— a reactive snapshot of the block tree plus a manipulation API.createVueBlock— author block tools as Vue components.provideBlok/useBlokDefaults— share default editor config through provide/inject.
Docs
Licensed under Apache-2.0.
Related Packages
Blok — headless, highly extensible rich text editor built for developers who nee...
Vue 3 bindings for RichKit: useEditor composable, EditorContent component and pr...
Notion-like block editor for Vue 3 — supports a sticky format toolbar and/or a f...
A lightweight, zero-dependency rich text editor with clean Feather icons. Framew...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.16.1 | ^3.5.0 | Apache-2.0 | |
| 1.16.0 | ^3.5.0 | Apache-2.0 | |
| 1.15.2 | ^3.5.0 | Apache-2.0 | |
| 1.15.1 | ^3.5.0 | Apache-2.0 | |
| 1.15.0 | ^3.5.0 | Apache-2.0 | |
| 1.14.0 | ^3.5.0 | Apache-2.0 | |
| 1.13.0 | ^3.5.0 | Apache-2.0 | |
| 1.12.0 | ^3.5.0 | Apache-2.0 | |
| 1.11.0 | ^3.5.0 | Apache-2.0 | |
| 1.10.1 | ^3.5.0 | Apache-2.0 | |
| 1.10.0 | ^3.5.0 | Apache-2.0 | |
| 1.9.0 | ^3.5.0 | Apache-2.0 | |
| 1.8.0 | ^3.5.0 | Apache-2.0 | |
| 1.7.0 | ^3.5.0 | Apache-2.0 | |
| 1.6.2 | ^3.5.0 | Apache-2.0 | |
| 1.6.1 | ^3.5.0 | Apache-2.0 | |
| 1.6.0 | ^3.5.0 | Apache-2.0 | |
| 1.5.0 | ^3.5.0 | Apache-2.0 | |
| 1.4.5 | ^3.5.0 | Apache-2.0 | |
| 1.4.4 | ^3.5.0 | Apache-2.0 | |
| 1.4.3 | ^3.5.0 | Apache-2.0 | |
| 1.4.2 | ^3.5.0 | Apache-2.0 | |
| 1.4.1 | ^3.5.0 | Apache-2.0 | |
| 1.4.0 | ^3.5.0 | Apache-2.0 | |
| 1.3.0 | ^3.5.0 | Apache-2.0 | |
| 1.2.6 | ^3.5.0 | Apache-2.0 | |
| 1.2.5 | ^3.5.0 | Apache-2.0 | |
| 1.2.4 | ^3.5.0 | Apache-2.0 | |
| 1.2.3 | ^3.5.0 | Apache-2.0 | |
| 1.2.2 | ^3.5.0 | Apache-2.0 |
Showing the latest 30 of 33. See every release on npm