lexical-vue
An extensible Vue 3 web text-editor based on Lexical.
166,694
362
| Install | |
|---|---|
npm install lexical-vue |
|
| Latest Version: | 0.18.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 16, 2026 |
| Links: | GitHub · npm |
Maintainer: wobsoriano
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 { LexicalComposer } from 'lexical-vue/LexicalComposer'
import { AutoFocusPlugin } from 'lexical-vue/LexicalAutoFocusPlugin'
import { ContentEditable } from 'lexical-vue/LexicalContentEditable'
import { HistoryPlugin } from 'lexical-vue/LexicalHistoryPlugin'
import { OnChangePlugin } from 'lexical-vue/LexicalOnChangePlugin'
import { PlainTextPlugin } from 'lexical-vue/LexicalPlainTextPlugin'
const config = {
editable: true,
theme: {
// Theme styling goes here
},
}
// 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">
<PlainTextPlugin>
<template #contentEditable>
<ContentEditable>
<template #placeholder>
<div>Enter some text...</div>
</template>
</ContentEditable>
</template>
</PlainTextPlugin>
<OnChangePlugin @change="onChange" />
<HistoryPlugin />
<AutoFocusPlugin />
</LexicalComposer>
</template>
For a more complex example, check the rich text editor playground.
Creating custom Lexical nodes with Vue
Documentation
https://lexical-vue.vercel.app
Credits
License
MIT
Related Packages
@matrajs/vue
Vue 3 bindings for Matra — useEditor, useEditorState, useEditorFocus and EditorC...
3,724
0
Version History
| Version | Released | License |
|---|---|---|
| 0.18.0 | MIT | |
| 0.17.0 | MIT | |
| 0.16.0 | MIT | |
| 0.15.1 | MIT | |
| 0.15.0 | MIT | |
| 0.14.1 | MIT | |
| 0.14.0 | MIT | |
| 0.13.1 | MIT | |
| 0.13.0 | MIT | |
| 0.12.0 | MIT | |
| 0.11.0 | MIT | |
| 0.10.0 | MIT | |
| 0.9.0 | MIT | |
| 0.8.4 | MIT | |
| 0.8.3 | MIT | |
| 0.8.2 | MIT | |
| 0.8.1 | MIT | |
| 0.8.0 | MIT | |
| 0.7.2 | MIT | |
| 0.7.1 | MIT | |
| 0.7.0 | MIT | |
| 0.6.3 | MIT | |
| 0.6.2 | MIT | |
| 0.6.1 | MIT | |
| 0.6.0 | MIT | |
| 0.5.1 | MIT | |
| 0.4.0 | MIT | |
| 0.3.19 | MIT | |
| 0.3.17 | MIT | |
| 0.3.16 | MIT |
Showing the latest 30 of 54. See every release on npm
Pre-releases (27)
| Version | Released | License |
|---|---|---|
| 0.1.0-beta.9 | MIT | |
| 0.1.0-beta.8 | MIT | |
| 0.1.0-beta.7 | MIT | |
| 0.1.0-beta.6 | MIT | |
| 0.1.0-beta.5 | MIT | |
| 0.1.0-beta.4 | MIT | |
| 0.1.0-beta.1 | MIT | |
| 0.0.9-beta.6 | MIT | |
| 0.0.9-beta.5 | MIT | |
| 0.0.9-beta.4 | MIT | |
| 0.0.9-beta.2 | MIT | |
| 0.0.9-beta.1 | MIT | |
| 0.0.8-beta.7 | MIT | |
| 0.0.8-beta.6 | MIT | |
| 0.0.8-beta.5 | MIT | |
| 0.0.8-beta.4 | MIT | |
| 0.0.8-beta.3 | MIT | |
| 0.0.8-beta.2 | MIT | |
| 0.0.8-beta.1 | MIT | |
| 0.0.7-beta.4 | MIT | |
| 0.0.7-beta.3 | MIT | |
| 0.0.7-beta.2 | MIT | |
| 0.0.7-beta.1 | MIT | |
| 0.0.6-beta.5 | MIT | |
| 0.0.6-beta.3 | MIT | |
| 0.0.6-beta.2 | MIT | |
| 0.0.6-beta.1 | MIT |