@lyfie/luthor-headless 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,14 +41,48 @@ function MyEditor() {
|
|
|
41
41
|
|
|
42
42
|
## Quick Start
|
|
43
43
|
|
|
44
|
+
### Installation
|
|
45
|
+
|
|
46
|
+
Luthor-Headless is designed to be lightweight with Lexical packages as **peer dependencies**.
|
|
47
|
+
|
|
44
48
|
```bash
|
|
49
|
+
# npm
|
|
45
50
|
npm install @lyfie/luthor-headless
|
|
51
|
+
|
|
52
|
+
# pnpm
|
|
53
|
+
pnpm add @lyfie/luthor-headless
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Install the required Lexical peer dependencies:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# npm
|
|
60
|
+
npm install lexical @lexical/react @lexical/html @lexical/markdown @lexical/list @lexical/rich-text @lexical/selection @lexical/utils @lexical/code @lexical/link @lexical/table
|
|
61
|
+
|
|
62
|
+
# pnpm
|
|
63
|
+
pnpm add lexical @lexical/react @lexical/html @lexical/markdown @lexical/list @lexical/rich-text @lexical/selection @lexical/utils @lexical/code @lexical/link @lexical/table
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> **💡 Want a simpler setup?** Check out [@lyfie/luthor](../luthor/README.md) which bundles all Lexical dependencies for you.
|
|
67
|
+
|
|
68
|
+
### Basic Usage
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# npm
|
|
72
|
+
npm install @lyfie/luthor-headless
|
|
73
|
+
|
|
74
|
+
# pnpm
|
|
75
|
+
pnpm add @lyfie/luthor-headless
|
|
46
76
|
```
|
|
47
77
|
|
|
48
78
|
Install the Lexical peer dependencies:
|
|
49
79
|
|
|
50
80
|
```bash
|
|
51
|
-
npm
|
|
81
|
+
# npm
|
|
82
|
+
npm install lexical @lexical/react @lexical/html @lexical/markdown @lexical/list @lexical/rich-text @lexical/selection @lexical/utils @lexical/code @lexical/link @lexical/table
|
|
83
|
+
|
|
84
|
+
# pnpm
|
|
85
|
+
pnpm add lexical @lexical/react @lexical/html @lexical/markdown @lexical/list @lexical/rich-text @lexical/selection @lexical/utils @lexical/code @lexical/link @lexical/table
|
|
52
86
|
```
|
|
53
87
|
|
|
54
88
|
```tsx
|
|
@@ -106,6 +140,50 @@ export default function App() {
|
|
|
106
140
|
|
|
107
141
|
**That's it.** You now have a fully functional, type-safe rich text editor.
|
|
108
142
|
|
|
143
|
+
## Installation Options
|
|
144
|
+
|
|
145
|
+
### Option 1: Headless Package (This Package)
|
|
146
|
+
|
|
147
|
+
For maximum control and flexibility:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# npm
|
|
151
|
+
npm install @lyfie/luthor-headless
|
|
152
|
+
npm install lexical @lexical/react @lexical/html @lexical/markdown @lexical/list @lexical/rich-text @lexical/selection @lexical/utils @lexical/code @lexical/link @lexical/table
|
|
153
|
+
|
|
154
|
+
# pnpm
|
|
155
|
+
pnpm add @lyfie/luthor-headless
|
|
156
|
+
pnpm add lexical @lexical/react @lexical/html @lexical/markdown @lexical/list @lexical/rich-text @lexical/selection @lexical/utils @lexical/code @lexical/link @lexical/table
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Use this when:**
|
|
160
|
+
- You want complete control over Lexical versions
|
|
161
|
+
- Building a custom editor UI from scratch
|
|
162
|
+
- Need minimum bundle size
|
|
163
|
+
- Want to manage dependencies yourself
|
|
164
|
+
|
|
165
|
+
### Option 2: Full Package (Recommended for Quick Start)
|
|
166
|
+
|
|
167
|
+
For a batteries-included experience:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# npm
|
|
171
|
+
npm install @lyfie/luthor-headless @lyfie/luthor
|
|
172
|
+
|
|
173
|
+
# pnpm
|
|
174
|
+
pnpm add @lyfie/luthor-headless @lyfie/luthor
|
|
175
|
+
|
|
176
|
+
# That's it! All Lexical dependencies included
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Use this when:**
|
|
180
|
+
- You want ready-to-use editor presets
|
|
181
|
+
- Don't want to manage Lexical dependencies
|
|
182
|
+
- Need a working editor quickly
|
|
183
|
+
- Want plug-and-play components
|
|
184
|
+
|
|
185
|
+
[📖 See @lyfie/luthor documentation](../luthor/README.md)
|
|
186
|
+
|
|
109
187
|
## Features
|
|
110
188
|
|
|
111
189
|
### 🎨 Built-in Extensions (25+)
|