Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

novel-vue

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

novel-vue

A Vue 3 component for the novel editor

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
73
decreased by-9.88%
Maintainers
1
Weekly downloads
 
Created
Source

Novel Vue

Novel Vue is port of Novel

Introduction

Novel is a Notion-style WYSIWYG editor with AI-powered autocompletions.

Installation

To use Novel Vue in a project, you can run the following command to install the novel-vue NPM package:

npm i novel-vue

Then, you can use it in your code like this:

<template>
  <Editor />
</template>

<script setup lang="ts">
import { Editor } from "novel-vue";
import "novel-vue/dist/style.css";
</script>
PropTypeDescriptionDefault
completionApiStringThe API route to use for the OpenAI completion API."/api/generate"
classNameStringAdditional classes to add to the editor container."relative min-h-500px] w-full mx-auto max-w-screen-lg border-stone-200 bg-white p-12 px-8 sm:mb-[calc(20vh)] sm:rounded-lg sm:border sm:px-12 sm:shadow-lg"
defaultValueJSONContentThe default value to use for the editor.defaultEditorContent
extensionsExtension[]A list of extensions to use for the editor, in addition to the default Novel extensions.[]
editorPropsEditorPropsProps to pass to the underlying Tiptap editor, in addition to the default Novel editor props.{}
onUpdateFunctionA callback function that is called whenever the editor is updated.() => {}
onDebouncedUpdateFunctionA callback function that is called whenever the editor is updated, but only after the defined debounce duration.() => {}
debounceDurationNumberThe duration (in milliseconds) to debounce the onDebouncedUpdate callback.750
storageKeyStringThe key to use for storing the editor's value in local storage."novel__content"

Note: Make sure to define an API endpoint that matches the completionApi prop (default is /api/generate). This is needed for the AI autocompletions to work. Here's an example: https://github.com/naveennaidu/novel-vue/blob/main/nuxt-server/server/api/generate.ts

FAQs

Package last updated on 13 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc