Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@crisp-fix/lexical-vue

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crisp-fix/lexical-vue

An extensible Vue 3 web text-editor based on Lexical.

latest
Source
npmnpm
Version
0.11.0
Version published
Maintainers
4
Created
Source

Lexical Vue

An extensible Vue 3 web text-editor based on Lexical.

For documentation and more information about Lexical, be sure to visit the Lexical website.

Here are some examples of what you can do with Lexical:

Getting started with Vue

Requires Vue >= 3.5.0.

Install lexical-vue:

npm install lexical-vue # or pnpm or yarn

Below is an example of a basic plain text editor using lexical and lexical-vue.

<script setup lang="ts">
import { $getRoot, $getSelection } from 'lexical'

import {
  LexicalAutoFocusPlugin,
  LexicalComposer,
  LexicalContentEditable,
  LexicalHistoryPlugin,
  LexicalOnChangePlugin,
  LexicalPlainTextPlugin,
} from 'lexical-vue'

const config = {
  editable: true,
  theme: {
    // Theme styling goes here
  },
}

function onError(error) {
  throw error
}

// When the editor changes, you can get notified via the
// LexicalOnChangePlugin!
function onChange(editorState) {
  editorState.read(() => {
    // Read the contents of the EditorState here.
    const root = $getRoot()
    const selection = $getSelection()

    console.log(root, selection)
  })
}
</script>

<template>
  <LexicalComposer :initial-config="config" @error="onError">
    <LexicalPlainTextPlugin>
      <template #contentEditable>
        <LexicalContentEditable />
      </template>
      <template #placeholder>
        <div>
          Enter some text...
        </div>
      </template>
    </LexicalPlainTextPlugin>
    <LexicalOnChangePlugin @change="onChange" />
    <LexicalHistoryPlugin />
    <LexicalAutoFocusPlugin />
  </LexicalComposer>
</template>

For a more complex example, check the rich text editor playground.

Creating custom Lexical nodes with Vue

Contributing

  • Create a new branch
    • git checkout -b my-new-branch
  • Commit your changes
    • git commit -a -m 'Description of the changes'
      • There are many ways of doing this and this is just a suggestion
  • Push your branch to GitHub
    • git push origin my-new-branch
  • Go to the repository page in GitHub and click on "Compare & pull request"
    • The GitHub CLI allows you to skip the web interface for this step (and much more)

Documentation

https://lexical-vue.vercel.app

Credits

License

MIT

Keywords

vue

FAQs

Package last updated on 15 Dec 2025

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