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

@novaprose/vue

v0.12.0

Published

NovaProse rich text editor for Vue 3: v-model component and composables (useEditor, useEditorState, useCommand), Nuxt-safe.

Readme

@novaprose/vue

Vue 3 bindings for the NovaProse rich text editor: a <NovaProseEditor> component with v-model and composables for building your own UI (useEditor, useEditorState, useCommand). SSR-safe (Nuxt).

Status: 0.x preview. The API may change between minor versions until 1.0.

npm install @novaprose/vue @novaprose/core
import '@novaprose/core/style.css';

Component

<script setup lang="ts">
import { ref } from 'vue';
import { NovaProseEditor } from '@novaprose/vue';

const html = ref('<p>Hello</p>');
</script>

<template>
  <NovaProseEditor
    v-model="html"
    :init="{ toolbar: 'undo redo | bold italic | link', menubar: true }"
  />
</template>

| Prop / event | What it does | | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | | v-model (modelValue / update:modelValue) | two-way HTML binding; external values are not added to undo history and are not echoed back | | defaultValue | initial value without v-model | | init | any core option (toolbar, menubar, plugins, uploadImage…) | | editable | read-only mode, can change at any time | | placeholder, toolbar, plugins, prosemirrorPlugins, language | common options as props (take precedence over init) | | name | renders <input type="hidden"> with the HTML for native forms | | @ready, @focus, @blur | receive the Editor instance | | class, style, id, aria-* | applied to the container |

A template ref exposes { editor, focus() }. init is read on mount; change key to apply new options. With VeeValidate, use v-model (useField → value) and @blur.

Nuxt

The server renders an empty container and the editor is created after mount, so <ClientOnly> is not required.

Composables: build your own UI

<script setup lang="ts">
import { useCommand, useEditor, useEditorState } from '@novaprose/vue';

const { el, editor } = useEditor({ content: '<p>…</p>', toolbar: false });
const bold = useCommand(editor, 'bold');
const words = useEditorState(editor, (e) => e.getText().split(/\s+/).filter(Boolean).length);
</script>

<template>
  <button
    :aria-pressed="bold.active.value"
    :disabled="!bold.enabled.value"
    @mousedown.prevent
    @click="bold.run"
  >
    B
  </button>
  <div ref="el" />
  <p>Words: {{ words ?? 0 }}</p>
</template>
  • useEditor(options) returns { el, editor, nodeViews }. The editor is created when el is mounted and destroyed on unmount.
  • useEditorState(editor, selector, isEqual?) returns a ShallowRef that updates only when the selector result changes (shallow comparison by default).
  • useCommand(editor, name) returns { active, enabled, run }; editor can be a ref or a getter.
  • More: block type lists, links, colors, a menu over the selection — Your own toolbar.

Node views: draw a node with a component

<!-- Callout.vue -->
<script setup lang="ts">
import { NodeViewContent, nodeViewProps } from '@novaprose/vue';
const props = defineProps(nodeViewProps);
</script>

<template>
  <div class="callout" :data-tone="props.node.attrs.tone">
    <div contenteditable="false">
      <select
        :value="props.node.attrs.tone"
        @change="props.updateAttributes({ tone: ($event.target as HTMLSelectElement).value })"
      >
        <option value="info">Info</option>
        <option value="warning">Warning</option>
      </select>
    </div>
    <NodeViewContent />
  </div>
</template>
import { definePlugin } from '@novaprose/core';
import { vueNodeView } from '@novaprose/vue';
import Callout from './Callout.vue';

const callout = definePlugin({
  name: 'callout',
  nodes: { callout: calloutSpec }, // parseDOM / toDOM as usual
  nodeViews: { callout: vueNodeView(Callout) },
});
  • The component renders inside your app (Teleport), so provide/inject, the router and stores work. With useEditor, render the returned component: <component :is="nodeViews" />.
  • updateAttributes() is one undo step; useNodeView() gives nested components the same props.
  • The saved HTML still comes from toDOM. Details: Node views.

License

MIT