@react-fabric/lexical 1.0.0-beta.51 → 1.0.0-beta.52
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/dist/cjs/packages/lexical/src/components/StickyComponent.js +1 -1
- package/dist/cjs/packages/lexical/src/editor/LexicalEditor.js +25 -0
- package/dist/esm/packages/lexical/src/components/StickyComponent.js +1 -1
- package/dist/esm/packages/lexical/src/editor/LexicalEditor.js +25 -0
- package/dist/types/editor/LexicalEditor.d.ts +25 -0
- package/package.json +5 -5
- package/src/components/StickyComponent.tsx +1 -1
- package/src/editor/LexicalEditor.tsx +25 -0
|
@@ -211,7 +211,7 @@ var StickyComponent = function StickyComponent(_ref) {
|
|
|
211
211
|
className: "sticky-placeholder",
|
|
212
212
|
children: "Sticky note..."
|
|
213
213
|
}),
|
|
214
|
-
ErrorBoundary: LexicalErrorBoundary
|
|
214
|
+
ErrorBoundary: LexicalErrorBoundary.LexicalErrorBoundary
|
|
215
215
|
}), /*#__PURE__*/jsxRuntime.jsx(LexicalAutoFocusPlugin.AutoFocusPlugin, {})]
|
|
216
216
|
})]
|
|
217
217
|
})]
|
|
@@ -25,6 +25,31 @@ var ToolbarPlugin = require('../plugins/ToolbarPlugin.js');
|
|
|
25
25
|
var theme = require('./theme.js');
|
|
26
26
|
var jsxRuntime = require('react/jsx-runtime');
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* LexicalEditor component is a rich text editor built using Lexical.
|
|
30
|
+
* It supports various features such as code highlighting, lists, tables, and sticky notes.
|
|
31
|
+
* It provides a customizable toolbar and handles editor state changes.
|
|
32
|
+
* It also supports drag-and-drop functionality for blocks.
|
|
33
|
+
* It can be used in both read-only and editable modes, and supports publishing mode for exporting content.
|
|
34
|
+
* It uses a custom theme and provides error handling for Lexical updates.
|
|
35
|
+
*
|
|
36
|
+
* @param {EditorProps} props - The properties for the LexicalEditor component.
|
|
37
|
+
* @returns {JSX.Element} The rendered LexicalEditor component.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```jsx
|
|
41
|
+
* <LexicalEditor
|
|
42
|
+
* value={initialValue}
|
|
43
|
+
* readOnly={false}
|
|
44
|
+
* publishMode={false}
|
|
45
|
+
* onChange={(value) => console.log("Editor value changed:", value)}
|
|
46
|
+
* onDirty={(isDirty) => console.log("Editor is dirty:", isDirty)}
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/lexical-playground--playground}
|
|
51
|
+
* @see {@link https://lexical.dev/docs/}
|
|
52
|
+
*/
|
|
28
53
|
var LexicalEditor = function LexicalEditor(_ref) {
|
|
29
54
|
var value = _ref.value,
|
|
30
55
|
readOnly = _ref.readOnly,
|
|
@@ -4,7 +4,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
4
4
|
import { AutoFocusPlugin } from '@lexical/react/LexicalAutoFocusPlugin';
|
|
5
5
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
6
6
|
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
|
|
7
|
-
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';
|
|
7
|
+
import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';
|
|
8
8
|
import { LexicalNestedComposer } from '@lexical/react/LexicalNestedComposer';
|
|
9
9
|
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin';
|
|
10
10
|
import { mdiFormatColorFill, mdiClose } from '../../../../node_modules/@mdi/js/mdi.js';
|
|
@@ -25,6 +25,31 @@ import { ToolbarPlugin } from '../plugins/ToolbarPlugin.js';
|
|
|
25
25
|
import { LexicalTheme } from './theme.js';
|
|
26
26
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* LexicalEditor component is a rich text editor built using Lexical.
|
|
30
|
+
* It supports various features such as code highlighting, lists, tables, and sticky notes.
|
|
31
|
+
* It provides a customizable toolbar and handles editor state changes.
|
|
32
|
+
* It also supports drag-and-drop functionality for blocks.
|
|
33
|
+
* It can be used in both read-only and editable modes, and supports publishing mode for exporting content.
|
|
34
|
+
* It uses a custom theme and provides error handling for Lexical updates.
|
|
35
|
+
*
|
|
36
|
+
* @param {EditorProps} props - The properties for the LexicalEditor component.
|
|
37
|
+
* @returns {JSX.Element} The rendered LexicalEditor component.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```jsx
|
|
41
|
+
* <LexicalEditor
|
|
42
|
+
* value={initialValue}
|
|
43
|
+
* readOnly={false}
|
|
44
|
+
* publishMode={false}
|
|
45
|
+
* onChange={(value) => console.log("Editor value changed:", value)}
|
|
46
|
+
* onDirty={(isDirty) => console.log("Editor is dirty:", isDirty)}
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/lexical-playground--playground}
|
|
51
|
+
* @see {@link https://lexical.dev/docs/}
|
|
52
|
+
*/
|
|
28
53
|
var LexicalEditor = function LexicalEditor(_ref) {
|
|
29
54
|
var value = _ref.value,
|
|
30
55
|
readOnly = _ref.readOnly,
|
|
@@ -10,4 +10,29 @@ export interface EditorProps {
|
|
|
10
10
|
onChange?: (value: KeyValue) => void;
|
|
11
11
|
onDirty?: (isDirty: boolean) => void;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* LexicalEditor component is a rich text editor built using Lexical.
|
|
15
|
+
* It supports various features such as code highlighting, lists, tables, and sticky notes.
|
|
16
|
+
* It provides a customizable toolbar and handles editor state changes.
|
|
17
|
+
* It also supports drag-and-drop functionality for blocks.
|
|
18
|
+
* It can be used in both read-only and editable modes, and supports publishing mode for exporting content.
|
|
19
|
+
* It uses a custom theme and provides error handling for Lexical updates.
|
|
20
|
+
*
|
|
21
|
+
* @param {EditorProps} props - The properties for the LexicalEditor component.
|
|
22
|
+
* @returns {JSX.Element} The rendered LexicalEditor component.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <LexicalEditor
|
|
27
|
+
* value={initialValue}
|
|
28
|
+
* readOnly={false}
|
|
29
|
+
* publishMode={false}
|
|
30
|
+
* onChange={(value) => console.log("Editor value changed:", value)}
|
|
31
|
+
* onDirty={(isDirty) => console.log("Editor is dirty:", isDirty)}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/lexical-playground--playground}
|
|
36
|
+
* @see {@link https://lexical.dev/docs/}
|
|
37
|
+
*/
|
|
13
38
|
export declare const LexicalEditor: ({ value, readOnly, publishMode, onChange, onDirty, }: EditorProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/lexical",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.52",
|
|
4
4
|
"description": "RUF: Lexical editor",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@lexical/react": "^0.27.1",
|
|
39
|
-
"@react-fabric/core": "^1.0.0-beta.
|
|
40
|
-
"@react-fabric/form": "^1.0.0-beta.
|
|
41
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
39
|
+
"@react-fabric/core": "^1.0.0-beta.52",
|
|
40
|
+
"@react-fabric/form": "^1.0.0-beta.52",
|
|
41
|
+
"@react-fabric/utilities": "^1.0.0-beta.52",
|
|
42
42
|
"classnames": "^2.5.1",
|
|
43
43
|
"lexical": "^0.27.1"
|
|
44
44
|
},
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"node": ">=18.12.0",
|
|
53
53
|
"npm": ">=8.19.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "0eabb9d88d91af93d657bcc209b226fd576e8260"
|
|
56
56
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
import { AutoFocusPlugin } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
27
27
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
28
28
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
29
|
-
import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
|
|
29
|
+
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
30
30
|
import { LexicalNestedComposer } from "@lexical/react/LexicalNestedComposer";
|
|
31
31
|
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
32
32
|
import { mdiClose, mdiFormatColorFill } from "@mdi/js";
|
|
@@ -64,6 +64,31 @@ export interface EditorProps {
|
|
|
64
64
|
onDirty?: (isDirty: boolean) => void;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* LexicalEditor component is a rich text editor built using Lexical.
|
|
69
|
+
* It supports various features such as code highlighting, lists, tables, and sticky notes.
|
|
70
|
+
* It provides a customizable toolbar and handles editor state changes.
|
|
71
|
+
* It also supports drag-and-drop functionality for blocks.
|
|
72
|
+
* It can be used in both read-only and editable modes, and supports publishing mode for exporting content.
|
|
73
|
+
* It uses a custom theme and provides error handling for Lexical updates.
|
|
74
|
+
*
|
|
75
|
+
* @param {EditorProps} props - The properties for the LexicalEditor component.
|
|
76
|
+
* @returns {JSX.Element} The rendered LexicalEditor component.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```jsx
|
|
80
|
+
* <LexicalEditor
|
|
81
|
+
* value={initialValue}
|
|
82
|
+
* readOnly={false}
|
|
83
|
+
* publishMode={false}
|
|
84
|
+
* onChange={(value) => console.log("Editor value changed:", value)}
|
|
85
|
+
* onDirty={(isDirty) => console.log("Editor is dirty:", isDirty)}
|
|
86
|
+
* />
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/lexical-playground--playground}
|
|
90
|
+
* @see {@link https://lexical.dev/docs/}
|
|
91
|
+
*/
|
|
67
92
|
export const LexicalEditor = ({
|
|
68
93
|
value,
|
|
69
94
|
readOnly,
|