# lexical
**Repository Path**: guodaxia_net/lexical
## Basic Information
- **Project Name**: lexical
- **Description**: https://github.com/facebook/lexical
- **Primary Language**: TypeScript
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-12-19
- **Last Updated**: 2025-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
An extensible text editor framework that provides excellent reliability, accessibility and performance.
Documentation | Getting Started | Playground | Gallery
## Features
- **Framework Agnostic Core** - Works with any UI framework, with official [React bindings](https://lexical.dev/docs/react/getting-started)
- **Reliable & Accessible** - Built-in accessibility support and WCAG compliance
- **Extensible** - Plugin-based architecture with powerful extension points
- **Immutable State Model** - Time-travel ready with built-in undo/redo
- **Collaborative Editing** - Real-time collaboration via [Yjs](https://github.com/yjs/yjs) integration
- **Serialization** - Import/export from JSON, Markdown, and HTML
- **Rich Content** - Support for tables, lists, code blocks, images, and custom nodes
- **Cross-browser** - Firefox 52+, Chrome 49+, Safari 11+, Edge 79+
- **Type Safe** - Written in TypeScript with comprehensive type definitions
## Quick Start
```bash
npm install lexical @lexical/react
```
```jsx
import { $getRoot, $getSelection } from 'lexical';
import { LexicalComposer } from '@lexical/react/LexicalComposer';
import { PlainTextPlugin } from '@lexical/react/LexicalPlainTextPlugin';
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';
const initialConfig = {
namespace: 'MyEditor',
onError: (error) => console.error(error),
};
function Editor() {
return (
}
ErrorBoundary={LexicalErrorBoundary}
/>
);
}
```
Try it yourself:
- [Plain Text Example](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview)
- [Rich Text Example](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-rich?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview)
## Development
```bash
# Install dependencies
npm install
# Start playground dev server
npm run start
# Run tests
npm run test-unit
npm run test-e2e-chromium
# Lint and type check
npm run ci-check
```
See [CONTRIBUTING.md](https://github.com/facebook/lexical/blob/main/CONTRIBUTING.md) for detailed development guidelines.
## Documentation
- **User Guide**: [lexical.dev/docs](https://lexical.dev/docs)
- **API Reference**: [lexical.dev/docs/api](https://lexical.dev/docs/api/modules/lexical)
- **Developer Guide**: [AGENTS.md](https://github.com/facebook/lexical/blob/main/AGENTS.md) - Architecture and development workflows
- **Examples**: [examples/](https://github.com/facebook/lexical/tree/main/examples) - Sample implementations
## Community & Support
- **Discord**: Join our [Discord server](https://discord.gg/KmG4wQnnD9) for questions and discussions
- **Twitter**: Follow [@lexicaljs](https://x.com/lexicaljs) for updates
- **Issues**: Report bugs and request features on [GitHub Issues](https://github.com/facebook/lexical/issues)
## Browser Support
| Browser | Version |
|---------|---------|
| Chrome | 49+ |
| Firefox | 52+ |
| Safari | 11+ |
| Edge | 79+ |
## Contributors
We welcome contributions! Please read our [Contributing Guide](https://github.com/facebook/lexical/blob/main/CONTRIBUTING.md) to learn about our development process and how to propose bugfixes and improvements.
## License
[MIT](https://github.com/facebook/lexical/blob/main/LICENSE) License © Meta Platforms, Inc.