@haklex/rich-plugin-toolbar 0.24.0 → 0.25.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 +24 -24
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -10,56 +10,56 @@ pnpm add @haklex/rich-plugin-toolbar
|
|
|
10
10
|
|
|
11
11
|
## Peer Dependencies
|
|
12
12
|
|
|
13
|
-
| Package
|
|
14
|
-
|
|
|
15
|
-
| `@lexical/list`
|
|
16
|
-
| `@lexical/react`
|
|
17
|
-
| `@lexical/rich-text` | `^0.
|
|
18
|
-
| `@lexical/selection` | `^0.
|
|
19
|
-
| `@lexical/utils`
|
|
20
|
-
| `lexical`
|
|
21
|
-
| `lucide-react`
|
|
22
|
-
| `react`
|
|
23
|
-
| `react-dom`
|
|
13
|
+
| Package | Version |
|
|
14
|
+
| -------------------- | --------- |
|
|
15
|
+
| `@lexical/list` | `^0.45.0` |
|
|
16
|
+
| `@lexical/react` | `^0.45.0` |
|
|
17
|
+
| `@lexical/rich-text` | `^0.45.0` |
|
|
18
|
+
| `@lexical/selection` | `^0.45.0` |
|
|
19
|
+
| `@lexical/utils` | `^0.45.0` |
|
|
20
|
+
| `lexical` | `^0.45.0` |
|
|
21
|
+
| `lucide-react` | `^1.0.0` |
|
|
22
|
+
| `react` | `>= 19` |
|
|
23
|
+
| `react-dom` | `>= 19` |
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
27
|
```tsx
|
|
28
|
-
import { ToolbarPlugin } from '@haklex/rich-plugin-toolbar'
|
|
29
|
-
import '@haklex/rich-plugin-toolbar/style.css'
|
|
28
|
+
import { ToolbarPlugin } from '@haklex/rich-plugin-toolbar';
|
|
29
|
+
import '@haklex/rich-plugin-toolbar/style.css';
|
|
30
30
|
|
|
31
31
|
function Editor() {
|
|
32
32
|
return (
|
|
33
33
|
<RichEditor>
|
|
34
34
|
<ToolbarPlugin />
|
|
35
35
|
</RichEditor>
|
|
36
|
-
)
|
|
36
|
+
);
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
The toolbar renders at the top of the editor with controls for text formatting (bold, italic, underline, strikethrough, code), block type selection (paragraph, headings, quote, lists), text alignment, and undo/redo.
|
|
41
41
|
|
|
42
42
|
```tsx
|
|
43
|
-
import type { ToolbarPluginProps } from '@haklex/rich-plugin-toolbar'
|
|
43
|
+
import type { ToolbarPluginProps } from '@haklex/rich-plugin-toolbar';
|
|
44
44
|
|
|
45
45
|
const props: ToolbarPluginProps = {
|
|
46
46
|
// ...
|
|
47
|
-
}
|
|
47
|
+
};
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Exports
|
|
51
51
|
|
|
52
|
-
| Export
|
|
53
|
-
|
|
|
54
|
-
| `ToolbarPlugin`
|
|
55
|
-
| `ToolbarPluginProps` | TypeScript type | Props type for `ToolbarPlugin`
|
|
52
|
+
| Export | Type | Description |
|
|
53
|
+
| -------------------- | --------------- | ---------------------------------------------------- |
|
|
54
|
+
| `ToolbarPlugin` | Component | Main toolbar component to render inside `RichEditor` |
|
|
55
|
+
| `ToolbarPluginProps` | TypeScript type | Props type for `ToolbarPlugin` |
|
|
56
56
|
|
|
57
57
|
## Sub-path Exports
|
|
58
58
|
|
|
59
|
-
| Path
|
|
60
|
-
|
|
|
61
|
-
| `@haklex/rich-plugin-toolbar`
|
|
62
|
-
| `@haklex/rich-plugin-toolbar/style.css` | Stylesheet
|
|
59
|
+
| Path | Description |
|
|
60
|
+
| --------------------------------------- | -------------------------- |
|
|
61
|
+
| `@haklex/rich-plugin-toolbar` | Plugin component and types |
|
|
62
|
+
| `@haklex/rich-plugin-toolbar/style.css` | Stylesheet |
|
|
63
63
|
|
|
64
64
|
## Part of Haklex
|
|
65
65
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-toolbar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Top toolbar plugin for rich editor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"lucide-react": "^1.0.0",
|
|
49
49
|
"react": ">=19",
|
|
50
50
|
"react-dom": ">=19",
|
|
51
|
-
"@haklex/rich-editor": "0.
|
|
52
|
-
"@haklex/rich-editor-ui": "0.
|
|
53
|
-
"@haklex/rich-style-token": "0.
|
|
51
|
+
"@haklex/rich-editor": "0.25.0",
|
|
52
|
+
"@haklex/rich-editor-ui": "0.25.0",
|
|
53
|
+
"@haklex/rich-style-token": "0.25.0"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|