npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@junhao/vue-editorjs

v0.6.0

Published

Editor js wrapping component

Readme

@junhao/vue-editorjs

npm version npm downloads license

English | 中文

A lightweight Editor.js wrapper component for Vue 3.

Features

  • Vue 3 Composition API (<script setup>)
  • TypeScript support with type declarations
  • ESM / CJS / UMD multi-format output
  • Full EditorJS config pass-through
  • Exposed save() and render() methods via template ref
  • Automatic lifecycle management (init on mount, destroy on unmount)

Installation

npm install @junhao/vue-editorjs

Install the Editor.js tools you need (all optional):

npm install @editorjs/header @editorjs/list @editorjs/image
# ...any other @editorjs/* tools

Quick Start

As a plugin (global registration)

import { createApp } from 'vue'
import Editor from '@junhao/vue-editorjs'
import App from './App.vue'

createApp(App).use(Editor).mount('#app')

Then use <vue-editorjs> in any component.

As a local component

<script setup>
import { Editor } from '@junhao/vue-editorjs'
</script>

<template>
  <Editor :config="editorConfig" @ready="onReady" />
</template>

Usage

Recommended: config prop

Pass a complete EditorConfig object — all Editor.js options and tools are supported:

<script setup>
import { ref, readonly } from 'vue'
import Header from '@editorjs/header'
import List from '@editorjs/list'
import ImageTool from '@editorjs/image'

const editorConfig = readonly({
  data: { blocks: [{ type: 'paragraph', data: { text: 'Hello!' } }] },
  tools: {
    header: { class: Header, config: { placeholder: 'Enter a header' } },
    list: List,
    image: {
      class: ImageTool,
      config: {
        endpoints: { byFile: 'http://localhost:8008/uploadFile' },
      },
    },
  },
})
</script>

<template>
  <vue-editorjs :config="editorConfig" @ready="onReady" @change="onChange" />
</template>

Shortcut props

For simple cases, use individual props instead of a full config object:

<vue-editorjs
  :data="initData"
  :tools="tools"
  :placeholder="'Start writing...'"
  :read-only="false"
  :min-height="300"
  @save="onSave"
/>

config takes priority over individual props when both are provided.

Props

| Prop | Type | Default | Description | |---|---|---|---| | config | EditorConfig | — | Complete EditorJS config (recommended) | | data | OutputData | — | Initial editor data | | tools | Record<string, ToolConstructable \| ToolSettings> | — | Editor tools | | placeholder | string \| false | — | First block placeholder | | readOnly | boolean | — | Enable read-only mode | | minHeight | number | — | Minimum editor height |

For advanced options (i18n, sanitizer, inlineToolbar, tunes, etc.), use the config prop.

Events

| Event | Payload | Description | |---|---|---| | ready | — | Editor is ready | | change | OutputData | Content changed | | save | OutputData | save() method called |

Exposed Methods

Access via template ref:

<script setup>
import { ref } from 'vue'
import type { Editor } from '@junhao/vue-editorjs'

const editorRef = ref<InstanceType<typeof Editor>>()

const handleSave = () => {
  editorRef.value?.save()
}
</script>

<template>
  <vue-editorjs ref="editorRef" :config="config" @save="onSave" />
  <button @click="handleSave">Save</button>
</template>

| Method | Returns | Description | |---|---|---| | save() | Promise<OutputData> | Save editor data and emit save event | | render(data) | void | Render data into the editor |

Available Tools (optional peerDependencies)

Install only the tools you need:

| Package | Description | |---|---| | @editorjs/header | Header block | | @editorjs/list | Ordered/unordered list | | @editorjs/nested-list | Nested list | | @editorjs/image | Image (with backend) | | @editorjs/simple-image | Image (no backend required) | | @editorjs/checklist | Checklist | | @editorjs/quote | Quote block | | @editorjs/code | Code block | | @editorjs/inline-code | Inline code | | @editorjs/delimiter | Delimiter | | @editorjs/embed | Embed (YouTube, etc.) | | @editorjs/link | Link tool | | @editorjs/link-autocomplete | Link autocomplete | | @editorjs/table | Table | | @editorjs/marker | Marker highlight | | @editorjs/warning | Warning block | | @editorjs/raw | Raw HTML | | @editorjs/paragraph | Paragraph (built-in) | | @editorjs/personality | Personality card | | @editorjs/attaches | File attachments | | @editorjs/underline | Underline (inline tool) |

License

MIT