A Novel Vue Editor with AI Autocompletion and Real-time Updates
A Notion-style WYSIWYG editor with AI autocompletion built on the Tiptap framework and integrated with Nuxt 3. The editor offers customizable properties for content updates and local storage integration, with active development supported by two maintainers and a growing community of users.
The Novel Vue editor, developed by novel.sh, offers a Notion-style interface enhanced with AI autocompletion features built on the Tiptap framework integrated with Nuxt 3. Key capabilities include customizable editor properties, real-time content updates, debounced updates, and local storage integration.
Developers can fine-tune the editor's behavior through various props:
onUpdate: Fires immediately when content changes
onDebouncedUpdate: Executes after a specified debounce period
debounceDuration: Sets the interval for delayed updates
storageKey: Defines the local storage key for value persistence
The editor can be seamlessly integrated into Vue applications using Nuxt 3. Here's an example of how to use it in a component:
<template>
<button @click="setContent">Set Content</button>
<Editor ref="editorRef" />
</template>
<script setup lang="ts">
import { Editor as EditorClass } from "@tiptap/core";
import { Editor } from "novel-vue";
import "novel-vue/dist/style.css";
const editorRef = ref<{ editor: EditorClass }>();
function setContent() {
if (editorRef.value) {
editorRef.value.editor.commands.setContent({
type: "doc",
content: [
{
type: "paragraph",
content: [
{
type: "text",
text: "Example Text",
},
],
},
],
});
}
}
</script>
The project maintains active development with the following GitHub metrics:
Stars: 145
Watchers: 5
Forks: 19
The codebase leverages modern web development technologies including:
TypeScript (46.6%)
Vue (43.9%)
CSS (7.0%)
JavaScript (1.9%)
HTML (0.6%)
The repository is maintained by two contributors, Naveen Naidu and Jack Huynh, who maintain an active development cycle with regular commits and releases.
The editor's core functionality is built around Tiptap, a rich text editor library, and enhanced with custom props for extended functionality. Key configuration options include:
The editor responds to content changes through two callback mechanisms:
onUpdate: This function is invoked immediately whenever the editor's content is modified
onDebouncedUpdate: This secondary callback is triggered after a defined debounce period, allowing for delayed processing of updates
To manage performance during rapid editing, the editor implements a debouncing mechanism controlled via the debounceDuration prop. This property accepts a duration in milliseconds, determining how long updates should be delayed before execution
For local storage integration, the storageKey prop defines the key used to store the editor's content in the browser's local storage. This allows developers to maintain the editor's state across page reloads or sessions
The technical implementation of the Novel Vue editor integrates seamlessly with the Nuxt 3 framework and employs modern web development practices including TypeScript. The editor's core functionality is based on the Tiptap framework, with additional custom configurations enabling enhanced functionality. These custom props include onUpdate and onDebouncedUpdate callbacks, which respectively trigger immediate and delayed content processing. The debounceDuration property allows developers to set the interval for delayed updates, optimizing performance during rapid editing.
The editor's custom configuration options enable developers to tailor its behavior to specific needs. A practical example demonstrates how to initialize an editor instance and manipulate its content programmatically using Vue's ref mechanism:
<template>
<button @click="setContent">Set Content</button>
<Editor ref="editorRef" />
</template>
<script setup lang="ts">
import { Editor as EditorClass } from "@tiptap/core";
import { Editor } from "novel-vue";
import "novel-vue/dist/style.css";
const editorRef = ref<{ editor: EditorClass }>();
function setContent() {
if (editorRef.value) {
editorRef.value.editor.commands.setContent({
type: "doc",
content: [
{
type: "paragraph",
content: [
{
type: "text",
text: "Example Text",
},
],
},
],
});
}
}
</script>
This example sets up an editor instance and includes a button that triggers content modification when clicked. The editor component is imported from the novel-vue package and integrated into a Vue application using the Nuxt 3 framework and Nuxt UI. The editor's content is managed through ref, allowing for programmatic manipulation of the editor's state.
The development of Novel Vue proceeds through active contributions from its maintainers. The project currently stands with 145 stars, five watchers, and 19 forks on GitHub, indicating community interest and involvement.
The technical architecture leverages modern web development frameworks, with TypeScript constituting 46.6% of the codebase. Vue.js makes up 43.9%, while CSS, JavaScript, and HTML contribute 7.0%, 1.9%, and 0.6% respectively. This combination enables the editor's rich-text capabilities while maintaining flexibility for customization.
Maintained by Naveen Naidu and Jack Huynh, the repository represents an active development ecosystem. Regular commits and releases support ongoing improvements and feature additions, demonstrating the project's sustained development focus.