@webiny/lexical-editor 6.0.0-beta.0 → 6.0.0-rc.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 +6 -12
- package/commands/image.d.ts +2 -2
- package/commands/image.js +2 -8
- package/commands/image.js.map +1 -1
- package/commands/index.d.ts +5 -3
- package/commands/index.js +5 -38
- package/commands/index.js.map +1 -1
- package/commands/list.d.ts +2 -2
- package/commands/list.js +4 -10
- package/commands/list.js.map +1 -1
- package/commands/quote.d.ts +2 -2
- package/commands/quote.js +2 -8
- package/commands/quote.js.map +1 -1
- package/commands/toolbar.d.ts +1 -0
- package/commands/toolbar.js +4 -0
- package/commands/toolbar.js.map +1 -0
- package/commands/typography.d.ts +8 -0
- package/commands/typography.js +4 -0
- package/commands/typography.js.map +1 -0
- package/components/Editor/EnsureHeadingTagPlugin.d.ts +6 -0
- package/components/Editor/EnsureHeadingTagPlugin.js +20 -0
- package/components/Editor/EnsureHeadingTagPlugin.js.map +1 -0
- package/components/Editor/RichTextEditor.d.ts +29 -12
- package/components/Editor/RichTextEditor.js +89 -110
- package/components/Editor/RichTextEditor.js.map +1 -1
- package/components/Editor/normalizeInputValue.d.ts +6 -0
- package/components/Editor/normalizeInputValue.js +16 -0
- package/components/Editor/normalizeInputValue.js.map +1 -0
- package/components/LexicalEditorConfig/LexicalEditorConfig.d.ts +14 -16
- package/components/LexicalEditorConfig/LexicalEditorConfig.js +21 -69
- package/components/LexicalEditorConfig/LexicalEditorConfig.js.map +1 -1
- package/components/LexicalEditorConfig/components/Node.d.ts +1 -1
- package/components/LexicalEditorConfig/components/Node.js +17 -26
- package/components/LexicalEditorConfig/components/Node.js.map +1 -1
- package/components/LexicalEditorConfig/components/Plugin.js +17 -26
- package/components/LexicalEditorConfig/components/Plugin.js.map +1 -1
- package/components/LexicalEditorConfig/components/ToolbarElement.js +17 -26
- package/components/LexicalEditorConfig/components/ToolbarElement.js.map +1 -1
- package/components/LexicalHtmlRenderer.d.ts +5 -8
- package/components/LexicalHtmlRenderer.js +35 -50
- package/components/LexicalHtmlRenderer.js.map +1 -1
- package/components/Toolbar/StaticToolbar.css +416 -0
- package/components/Toolbar/StaticToolbar.d.ts +3 -1
- package/components/Toolbar/StaticToolbar.js +19 -23
- package/components/Toolbar/StaticToolbar.js.map +1 -1
- package/components/ToolbarActions/BoldAction.js +16 -21
- package/components/ToolbarActions/BoldAction.js.map +1 -1
- package/components/ToolbarActions/BulletListAction.js +25 -31
- package/components/ToolbarActions/BulletListAction.js.map +1 -1
- package/components/ToolbarActions/CodeHighlightAction.js +16 -21
- package/components/ToolbarActions/CodeHighlightAction.js.map +1 -1
- package/components/ToolbarActions/FontColorAction.d.ts +16 -4
- package/components/ToolbarActions/FontColorAction.js +32 -43
- package/components/ToolbarActions/FontColorAction.js.map +1 -1
- package/components/ToolbarActions/ImageAction.js +19 -34
- package/components/ToolbarActions/ImageAction.js.map +1 -1
- package/components/ToolbarActions/ItalicAction.js +16 -21
- package/components/ToolbarActions/ItalicAction.js.map +1 -1
- package/components/ToolbarActions/LinkAction.js +19 -24
- package/components/ToolbarActions/LinkAction.js.map +1 -1
- package/components/ToolbarActions/NumberedListAction.js +25 -36
- package/components/ToolbarActions/NumberedListAction.js.map +1 -1
- package/components/ToolbarActions/QuoteAction.js +20 -25
- package/components/ToolbarActions/QuoteAction.js.map +1 -1
- package/components/ToolbarActions/TextAlignmentAction.d.ts +16 -4
- package/components/ToolbarActions/TextAlignmentAction.js +36 -45
- package/components/ToolbarActions/TextAlignmentAction.js.map +1 -1
- package/components/ToolbarActions/TypographyAction.d.ts +16 -4
- package/components/ToolbarActions/TypographyAction.js +57 -79
- package/components/ToolbarActions/TypographyAction.js.map +1 -1
- package/components/ToolbarActions/UnderlineAction.js +16 -21
- package/components/ToolbarActions/UnderlineAction.js.map +1 -1
- package/context/FontColorActionContext.js +2 -9
- package/context/FontColorActionContext.js.map +1 -1
- package/context/RichTextEditorContext.d.ts +7 -8
- package/context/RichTextEditorContext.js +28 -26
- package/context/RichTextEditorContext.js.map +1 -1
- package/context/SharedHistoryContext.d.ts +3 -3
- package/context/SharedHistoryContext.js +12 -20
- package/context/SharedHistoryContext.js.map +1 -1
- package/context/TextAlignmentActionContextProps.d.ts +1 -1
- package/context/TextAlignmentActionContextProps.js +2 -9
- package/context/TextAlignmentActionContextProps.js.map +1 -1
- package/context/TypographyActionContext.d.ts +3 -2
- package/context/TypographyActionContext.js +2 -9
- package/context/TypographyActionContext.js.map +1 -1
- package/exports/admin/lexical.d.ts +15 -0
- package/exports/admin/lexical.js +23 -0
- package/exports/admin/lexical.js.map +1 -0
- package/hooks/index.d.ts +7 -8
- package/hooks/index.js +7 -93
- package/hooks/index.js.map +1 -1
- package/hooks/useCurrentElement.d.ts +3 -3
- package/hooks/useCurrentElement.js +11 -18
- package/hooks/useCurrentElement.js.map +1 -1
- package/hooks/useCurrentSelection.d.ts +2 -1
- package/hooks/useCurrentSelection.js +27 -40
- package/hooks/useCurrentSelection.js.map +1 -1
- package/hooks/useFontColorPicker.d.ts +1 -1
- package/hooks/useFontColorPicker.js +5 -11
- package/hooks/useFontColorPicker.js.map +1 -1
- package/hooks/useIsMounted.js +6 -14
- package/hooks/useIsMounted.js.map +1 -1
- package/hooks/useRichTextEditor.d.ts +1 -1
- package/hooks/useRichTextEditor.js +5 -11
- package/hooks/useRichTextEditor.js.map +1 -1
- package/hooks/useTextAlignmentAction.d.ts +1 -1
- package/hooks/useTextAlignmentAction.js +5 -11
- package/hooks/useTextAlignmentAction.js.map +1 -1
- package/hooks/useTypographyAction.d.ts +1 -1
- package/hooks/useTypographyAction.js +5 -11
- package/hooks/useTypographyAction.js.map +1 -1
- package/index.d.ts +33 -38
- package/index.js +44 -322
- package/index.js.map +1 -1
- package/package.json +18 -22
- package/plugins/BlurEventPlugin/BlurEventPlugin.d.ts +2 -2
- package/plugins/BlurEventPlugin/BlurEventPlugin.js +16 -22
- package/plugins/BlurEventPlugin/BlurEventPlugin.js.map +1 -1
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +9 -14
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js.map +1 -1
- package/plugins/CodeHighlightPlugin/index.d.ts +1 -1
- package/plugins/CodeHighlightPlugin/index.js +1 -16
- package/plugins/CodeHighlightPlugin/index.js.map +1 -1
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.d.ts +10 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +28 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js.map +1 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorController.d.ts +7 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorController.js +61 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorController.js.map +1 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.css +2 -136
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.d.ts +4 -16
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +7 -180
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js.map +1 -1
- package/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -1
- package/plugins/FloatingLinkEditorPlugin/index.js +1 -16
- package/plugins/FloatingLinkEditorPlugin/index.js.map +1 -1
- package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.js +2 -8
- package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.js.map +1 -1
- package/plugins/FloatingLinkEditorPlugin/types.d.ts +10 -0
- package/plugins/FloatingLinkEditorPlugin/types.js +3 -0
- package/plugins/FloatingLinkEditorPlugin/types.js.map +1 -0
- package/plugins/FloatingLinkEditorPlugin/useFloatingLinkEditor.d.ts +8 -2
- package/plugins/FloatingLinkEditorPlugin/useFloatingLinkEditor.js +119 -63
- package/plugins/FloatingLinkEditorPlugin/useFloatingLinkEditor.js.map +1 -1
- package/plugins/FontColorPlugin/FontColorPlugin.js +19 -28
- package/plugins/FontColorPlugin/FontColorPlugin.js.map +1 -1
- package/plugins/FontColorPlugin/applyColorToNode.d.ts +3 -0
- package/plugins/FontColorPlugin/applyColorToNode.js +8 -0
- package/plugins/FontColorPlugin/applyColorToNode.js.map +1 -0
- package/plugins/FontColorPlugin/applyColorToSelection.d.ts +3 -0
- package/plugins/FontColorPlugin/applyColorToSelection.js +66 -0
- package/plugins/FontColorPlugin/applyColorToSelection.js.map +1 -0
- package/plugins/ImagesPlugin/ImagesPlugin.d.ts +2 -3
- package/plugins/ImagesPlugin/ImagesPlugin.js +58 -60
- package/plugins/ImagesPlugin/ImagesPlugin.js.map +1 -1
- package/plugins/LinkPlugin/LinkPlugin.d.ts +1 -1
- package/plugins/LinkPlugin/LinkPlugin.js +29 -37
- package/plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/plugins/ListPLugin/ListPlugin.js +52 -15
- package/plugins/ListPLugin/ListPlugin.js.map +1 -1
- package/plugins/QuoteNodePlugin/QuoteNodePlugin.js +19 -16
- package/plugins/QuoteNodePlugin/QuoteNodePlugin.js.map +1 -1
- package/plugins/StateHandlingPlugin.d.ts +8 -0
- package/plugins/StateHandlingPlugin.js +75 -0
- package/plugins/StateHandlingPlugin.js.map +1 -0
- package/plugins/TypographyPlugin/TypographyPlugin.js +17 -21
- package/plugins/TypographyPlugin/TypographyPlugin.js.map +1 -1
- package/types.d.ts +8 -8
- package/types.js +6 -38
- package/types.js.map +1 -1
- package/ui/ContentEditable.d.ts +0 -1
- package/ui/ContentEditable.js +7 -14
- package/ui/ContentEditable.js.map +1 -1
- package/ui/Divider.d.ts +0 -1
- package/ui/Divider.js +3 -10
- package/ui/Divider.js.map +1 -1
- package/ui/DropDown.d.ts +1 -1
- package/ui/DropDown.js +64 -90
- package/ui/DropDown.js.map +1 -1
- package/ui/ImageResizer.d.ts +0 -1
- package/ui/ImageResizer.js +84 -89
- package/ui/ImageResizer.js.map +1 -1
- package/ui/LinkPreview.d.ts +0 -1
- package/ui/LinkPreview.js +22 -29
- package/ui/LinkPreview.js.map +1 -1
- package/ui/Placeholder.d.ts +1 -1
- package/ui/Placeholder.js +10 -16
- package/ui/Placeholder.js.map +1 -1
- package/ui/TextInput.d.ts +1 -2
- package/ui/TextInput.js +11 -18
- package/ui/TextInput.js.map +1 -1
- package/ui/ToolbarActionDialog.js +30 -42
- package/ui/ToolbarActionDialog.js.map +1 -1
- package/utils/canUseDOM.js +1 -7
- package/utils/canUseDOM.js.map +1 -1
- package/utils/files.d.ts +6 -7
- package/utils/files.js +5 -56
- package/utils/files.js.map +1 -1
- package/utils/getDOMRangeRect.js +4 -10
- package/utils/getDOMRangeRect.js.map +1 -1
- package/utils/getSelectedNode.d.ts +1 -1
- package/utils/getSelectedNode.js +9 -16
- package/utils/getSelectedNode.js.map +1 -1
- package/utils/getTransparentImage.js +1 -7
- package/utils/getTransparentImage.js.map +1 -1
- package/utils/insertImage.d.ts +1 -1
- package/utils/insertImage.js +8 -14
- package/utils/insertImage.js.map +1 -1
- package/utils/isAnchorLink.js +1 -7
- package/utils/isAnchorLink.js.map +1 -1
- package/utils/isChildOfFloatingToolbar.js +2 -8
- package/utils/isChildOfFloatingToolbar.js.map +1 -1
- package/utils/isHTMLElement.js +1 -7
- package/utils/isHTMLElement.js.map +1 -1
- package/utils/isValidJSON.js +3 -9
- package/utils/isValidJSON.js.map +1 -1
- package/utils/isValidLexicalData.d.ts +3 -3
- package/utils/isValidLexicalData.js +6 -12
- package/utils/isValidLexicalData.js.map +1 -1
- package/utils/point.js +35 -60
- package/utils/point.js.map +1 -1
- package/utils/rect.d.ts +2 -2
- package/utils/rect.js +115 -149
- package/utils/rect.js.map +1 -1
- package/utils/sanitizeUrl.js +6 -13
- package/utils/sanitizeUrl.js.map +1 -1
- package/utils/setFloatingElemPosition.d.ts +1 -1
- package/utils/setFloatingElemPosition.js +29 -39
- package/utils/setFloatingElemPosition.js.map +1 -1
- package/components/Editor/HeadingEditor.d.ts +0 -7
- package/components/Editor/HeadingEditor.js +0 -29
- package/components/Editor/HeadingEditor.js.map +0 -1
- package/components/Editor/ParagraphEditor.d.ts +0 -7
- package/components/Editor/ParagraphEditor.js +0 -29
- package/components/Editor/ParagraphEditor.js.map +0 -1
- package/components/Toolbar/Toolbar.css +0 -647
- package/components/Toolbar/Toolbar.d.ts +0 -6
- package/components/Toolbar/Toolbar.js +0 -162
- package/components/Toolbar/Toolbar.js.map +0 -1
- package/components/ToolbarActions/FontSizeAction.d.ts +0 -2
- package/components/ToolbarActions/FontSizeAction.js +0 -88
- package/components/ToolbarActions/FontSizeAction.js.map +0 -1
- package/hooks/useList.d.ts +0 -2
- package/hooks/useList.js +0 -54
- package/hooks/useList.js.map +0 -1
- package/hooks/useQuote.d.ts +0 -2
- package/hooks/useQuote.js +0 -22
- package/hooks/useQuote.js.map +0 -1
- package/plugins/FloatingLinkEditorPlugin/LinkEditForm.d.ts +0 -9
- package/plugins/FloatingLinkEditorPlugin/LinkEditForm.js +0 -118
- package/plugins/FloatingLinkEditorPlugin/LinkEditForm.js.map +0 -1
- package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.d.ts +0 -9
- package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.js +0 -44
- package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.js.map +0 -1
- package/plugins/LexicalUpdateStatePlugin/UpdateStatePlugin.d.ts +0 -9
- package/plugins/LexicalUpdateStatePlugin/UpdateStatePlugin.js +0 -45
- package/plugins/LexicalUpdateStatePlugin/UpdateStatePlugin.js.map +0 -1
- package/plugins/LexicalUpdateStatePlugin/index.d.ts +0 -1
- package/plugins/LexicalUpdateStatePlugin/index.js +0 -18
- package/plugins/LexicalUpdateStatePlugin/index.js.map +0 -1
- package/utils/generateInitialLexicalValue.d.ts +0 -5
- package/utils/generateInitialLexicalValue.js +0 -33
- package/utils/generateInitialLexicalValue.js.map +0 -1
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.useCurrentElement = useCurrentElement;
|
|
8
|
-
var _utils = require("@lexical/utils");
|
|
9
|
-
var _lexical = require("lexical");
|
|
10
|
-
var _useCurrentSelection = require("./useCurrentSelection");
|
|
11
|
-
function useCurrentElement() {
|
|
12
|
-
return (0, _useCurrentSelection.useDeriveValueFromSelection)(function (_ref) {
|
|
13
|
-
var rangeSelection = _ref.rangeSelection;
|
|
1
|
+
import { $isRootOrShadowRoot, $findMatchingParent } from "lexical";
|
|
2
|
+
import { useDeriveValueFromSelection } from "./useCurrentSelection.js";
|
|
3
|
+
export function useCurrentElement() {
|
|
4
|
+
return useDeriveValueFromSelection(({
|
|
5
|
+
rangeSelection
|
|
6
|
+
}) => {
|
|
14
7
|
if (!rangeSelection) {
|
|
15
8
|
return {
|
|
16
9
|
element: null
|
|
@@ -21,11 +14,11 @@ function useCurrentElement() {
|
|
|
21
14
|
};
|
|
22
15
|
});
|
|
23
16
|
}
|
|
24
|
-
function getNodeFromSelection(selection) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return parent !== null &&
|
|
17
|
+
export function getNodeFromSelection(selection) {
|
|
18
|
+
const anchorNode = selection.anchor.getNode();
|
|
19
|
+
const element = anchorNode.getKey() === "root" ? anchorNode : $findMatchingParent(anchorNode, e => {
|
|
20
|
+
const parent = e.getParent();
|
|
21
|
+
return parent !== null && $isRootOrShadowRoot(parent);
|
|
29
22
|
});
|
|
30
23
|
return element || anchorNode.getTopLevelElementOrThrow();
|
|
31
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["$isRootOrShadowRoot","$findMatchingParent","useDeriveValueFromSelection","useCurrentElement","rangeSelection","element","getNodeFromSelection","selection","anchorNode","anchor","getNode","getKey","e","parent","getParent","getTopLevelElementOrThrow"],"sources":["useCurrentElement.ts"],"sourcesContent":["import type { RangeSelection } from \"lexical\";\nimport { $isRootOrShadowRoot, $findMatchingParent } from \"lexical\";\nimport { useDeriveValueFromSelection } from \"~/hooks/useCurrentSelection.js\";\n\nexport function useCurrentElement() {\n return useDeriveValueFromSelection(({ rangeSelection }) => {\n if (!rangeSelection) {\n return { element: null };\n }\n\n return { element: getNodeFromSelection(rangeSelection) };\n });\n}\n\nexport function getNodeFromSelection(selection: RangeSelection) {\n const anchorNode = selection.anchor.getNode();\n\n const element =\n anchorNode.getKey() === \"root\"\n ? anchorNode\n : $findMatchingParent(anchorNode, e => {\n const parent = e.getParent();\n return parent !== null && $isRootOrShadowRoot(parent);\n });\n\n return element || anchorNode.getTopLevelElementOrThrow();\n}\n"],"mappings":"AACA,SAASA,mBAAmB,EAAEC,mBAAmB,QAAQ,SAAS;AAClE,SAASC,2BAA2B;AAEpC,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EAChC,OAAOD,2BAA2B,CAAC,CAAC;IAAEE;EAAe,CAAC,KAAK;IACvD,IAAI,CAACA,cAAc,EAAE;MACjB,OAAO;QAAEC,OAAO,EAAE;MAAK,CAAC;IAC5B;IAEA,OAAO;MAAEA,OAAO,EAAEC,oBAAoB,CAACF,cAAc;IAAE,CAAC;EAC5D,CAAC,CAAC;AACN;AAEA,OAAO,SAASE,oBAAoBA,CAACC,SAAyB,EAAE;EAC5D,MAAMC,UAAU,GAAGD,SAAS,CAACE,MAAM,CAACC,OAAO,CAAC,CAAC;EAE7C,MAAML,OAAO,GACTG,UAAU,CAACG,MAAM,CAAC,CAAC,KAAK,MAAM,GACxBH,UAAU,GACVP,mBAAmB,CAACO,UAAU,EAAEI,CAAC,IAAI;IACjC,MAAMC,MAAM,GAAGD,CAAC,CAACE,SAAS,CAAC,CAAC;IAC5B,OAAOD,MAAM,KAAK,IAAI,IAAIb,mBAAmB,CAACa,MAAM,CAAC;EACzD,CAAC,CAAC;EAEZ,OAAOR,OAAO,IAAIG,UAAU,CAACO,yBAAyB,CAAC,CAAC;AAC5D","ignoreList":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RangeSelection, NodeSelection } from "lexical";
|
|
2
|
+
import { $getSelection } from "lexical";
|
|
2
3
|
export interface CurrentSelection {
|
|
3
4
|
selection: ReturnType<typeof $getSelection>;
|
|
4
5
|
rangeSelection: RangeSelection | null;
|
|
@@ -1,39 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.useCurrentSelection = useCurrentSelection;
|
|
8
|
-
exports.useDeriveValueFromSelection = useDeriveValueFromSelection;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _lexical = require("lexical");
|
|
12
|
-
var _useIsMounted = require("./useIsMounted");
|
|
13
|
-
var _useRichTextEditor3 = require("./useRichTextEditor");
|
|
1
|
+
import { useCallback, useEffect, useState } from "react";
|
|
2
|
+
import { $getSelection, $isRangeSelection, $isNodeSelection } from "lexical";
|
|
3
|
+
import { useIsMounted } from "./useIsMounted.js";
|
|
4
|
+
import { useRichTextEditor } from "./useRichTextEditor.js";
|
|
14
5
|
function getOutput(selection) {
|
|
15
6
|
return {
|
|
16
|
-
selection
|
|
17
|
-
rangeSelection:
|
|
18
|
-
nodeSelection:
|
|
7
|
+
selection,
|
|
8
|
+
rangeSelection: $isRangeSelection(selection) ? selection : null,
|
|
9
|
+
nodeSelection: $isNodeSelection(selection) ? selection : null
|
|
19
10
|
};
|
|
20
11
|
}
|
|
21
|
-
function useCurrentSelection() {
|
|
22
|
-
|
|
23
|
-
editor
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var storeSelection = (0, _react.useCallback)(function () {
|
|
30
|
-
editor.getEditorState().read(function () {
|
|
12
|
+
export function useCurrentSelection() {
|
|
13
|
+
const {
|
|
14
|
+
editor
|
|
15
|
+
} = useRichTextEditor();
|
|
16
|
+
const [selection, setSelection] = useState(getOutput(null));
|
|
17
|
+
const isMounted = useIsMounted();
|
|
18
|
+
const storeSelection = useCallback(() => {
|
|
19
|
+
editor.read(() => {
|
|
31
20
|
if (isMounted()) {
|
|
32
|
-
setSelection(getOutput(
|
|
21
|
+
setSelection(getOutput($getSelection()));
|
|
33
22
|
}
|
|
34
23
|
});
|
|
35
24
|
}, [editor]);
|
|
36
|
-
|
|
25
|
+
useEffect(() => {
|
|
37
26
|
// On first mount, store current selection.
|
|
38
27
|
storeSelection();
|
|
39
28
|
|
|
@@ -42,22 +31,20 @@ function useCurrentSelection() {
|
|
|
42
31
|
}, []);
|
|
43
32
|
return selection;
|
|
44
33
|
}
|
|
45
|
-
function useDeriveValueFromSelection(generator) {
|
|
46
|
-
|
|
47
|
-
editor
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var generateValue = (0, _react.useCallback)(function () {
|
|
54
|
-
editor.getEditorState().read(function () {
|
|
34
|
+
export function useDeriveValueFromSelection(generator) {
|
|
35
|
+
const {
|
|
36
|
+
editor
|
|
37
|
+
} = useRichTextEditor();
|
|
38
|
+
const [value, setValue] = useState(generator(getOutput(null)));
|
|
39
|
+
const isMounted = useIsMounted();
|
|
40
|
+
const generateValue = useCallback(() => {
|
|
41
|
+
editor.read(() => {
|
|
55
42
|
if (isMounted()) {
|
|
56
|
-
setValue(generator(getOutput(
|
|
43
|
+
setValue(generator(getOutput($getSelection())));
|
|
57
44
|
}
|
|
58
45
|
});
|
|
59
46
|
}, [editor]);
|
|
60
|
-
|
|
47
|
+
useEffect(() => {
|
|
61
48
|
// On first mount, generate current value.
|
|
62
49
|
generateValue();
|
|
63
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useState","$getSelection","$isRangeSelection","$isNodeSelection","useIsMounted","useRichTextEditor","getOutput","selection","rangeSelection","nodeSelection","useCurrentSelection","editor","setSelection","isMounted","storeSelection","read","registerUpdateListener","useDeriveValueFromSelection","generator","value","setValue","generateValue"],"sources":["useCurrentSelection.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\nimport type { RangeSelection, NodeSelection } from \"lexical\";\nimport { $getSelection, $isRangeSelection, $isNodeSelection } from \"lexical\";\nimport { useIsMounted } from \"./useIsMounted.js\";\nimport { useRichTextEditor } from \"~/hooks/useRichTextEditor.js\";\n\nexport interface CurrentSelection {\n selection: ReturnType<typeof $getSelection>;\n rangeSelection: RangeSelection | null;\n nodeSelection: NodeSelection | null;\n}\n\ninterface Generator<T> {\n (params: CurrentSelection): T;\n}\n\nfunction getOutput(selection: ReturnType<typeof $getSelection>) {\n return {\n selection,\n rangeSelection: $isRangeSelection(selection) ? selection : null,\n nodeSelection: $isNodeSelection(selection) ? selection : null\n };\n}\n\nexport function useCurrentSelection() {\n const { editor } = useRichTextEditor();\n const [selection, setSelection] = useState<CurrentSelection>(getOutput(null));\n const isMounted = useIsMounted();\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n if (isMounted()) {\n setSelection(getOutput($getSelection()));\n }\n });\n }, [editor]);\n\n useEffect(() => {\n // On first mount, store current selection.\n storeSelection();\n\n // Subscribe to editor updates and keep track of the selection.\n return editor.registerUpdateListener(storeSelection);\n }, []);\n\n return selection;\n}\n\nexport function useDeriveValueFromSelection<T>(generator: Generator<T>) {\n const { editor } = useRichTextEditor();\n const [value, setValue] = useState<T>(generator(getOutput(null)));\n const isMounted = useIsMounted();\n\n const generateValue = useCallback(() => {\n editor.read(() => {\n if (isMounted()) {\n setValue(generator(getOutput($getSelection())));\n }\n });\n }, [editor]);\n\n useEffect(() => {\n // On first mount, generate current value.\n generateValue();\n\n // Subscribe to editor updates and regenerate the value.\n return editor.registerUpdateListener(generateValue);\n }, []);\n\n return value;\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAExD,SAASC,aAAa,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,SAAS;AAC5E,SAASC,YAAY;AACrB,SAASC,iBAAiB;AAY1B,SAASC,SAASA,CAACC,SAA2C,EAAE;EAC5D,OAAO;IACHA,SAAS;IACTC,cAAc,EAAEN,iBAAiB,CAACK,SAAS,CAAC,GAAGA,SAAS,GAAG,IAAI;IAC/DE,aAAa,EAAEN,gBAAgB,CAACI,SAAS,CAAC,GAAGA,SAAS,GAAG;EAC7D,CAAC;AACL;AAEA,OAAO,SAASG,mBAAmBA,CAAA,EAAG;EAClC,MAAM;IAAEC;EAAO,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EACtC,MAAM,CAACE,SAAS,EAAEK,YAAY,CAAC,GAAGZ,QAAQ,CAAmBM,SAAS,CAAC,IAAI,CAAC,CAAC;EAC7E,MAAMO,SAAS,GAAGT,YAAY,CAAC,CAAC;EAEhC,MAAMU,cAAc,GAAGhB,WAAW,CAAC,MAAM;IACrCa,MAAM,CAACI,IAAI,CAAC,MAAM;MACd,IAAIF,SAAS,CAAC,CAAC,EAAE;QACbD,YAAY,CAACN,SAAS,CAACL,aAAa,CAAC,CAAC,CAAC,CAAC;MAC5C;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CAACU,MAAM,CAAC,CAAC;EAEZZ,SAAS,CAAC,MAAM;IACZ;IACAe,cAAc,CAAC,CAAC;;IAEhB;IACA,OAAOH,MAAM,CAACK,sBAAsB,CAACF,cAAc,CAAC;EACxD,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOP,SAAS;AACpB;AAEA,OAAO,SAASU,2BAA2BA,CAAIC,SAAuB,EAAE;EACpE,MAAM;IAAEP;EAAO,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EACtC,MAAM,CAACc,KAAK,EAAEC,QAAQ,CAAC,GAAGpB,QAAQ,CAAIkB,SAAS,CAACZ,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;EACjE,MAAMO,SAAS,GAAGT,YAAY,CAAC,CAAC;EAEhC,MAAMiB,aAAa,GAAGvB,WAAW,CAAC,MAAM;IACpCa,MAAM,CAACI,IAAI,CAAC,MAAM;MACd,IAAIF,SAAS,CAAC,CAAC,EAAE;QACbO,QAAQ,CAACF,SAAS,CAACZ,SAAS,CAACL,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;MACnD;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CAACU,MAAM,CAAC,CAAC;EAEZZ,SAAS,CAAC,MAAM;IACZ;IACAsB,aAAa,CAAC,CAAC;;IAEf;IACA,OAAOV,MAAM,CAACK,sBAAsB,CAACK,aAAa,CAAC;EACvD,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,KAAK;AAChB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FontColorActionContext } from "../context/FontColorActionContext";
|
|
1
|
+
import { FontColorActionContext } from "../context/FontColorActionContext.js";
|
|
2
2
|
export declare function useFontColorPicker(): FontColorActionContext;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useFontColorPicker = useFontColorPicker;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _FontColorActionContext = require("../context/FontColorActionContext");
|
|
9
|
-
function useFontColorPicker() {
|
|
10
|
-
var context = (0, _react.useContext)(_FontColorActionContext.FontColorActionContext);
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { FontColorActionContext } from "../context/FontColorActionContext.js";
|
|
3
|
+
export function useFontColorPicker() {
|
|
4
|
+
const context = useContext(FontColorActionContext);
|
|
11
5
|
if (!context) {
|
|
12
|
-
throw Error(
|
|
6
|
+
throw Error(`Missing FontColorActionContext in the component hierarchy. Are you using "useFontColorPicker()" in the right place?`);
|
|
13
7
|
}
|
|
14
8
|
return context;
|
|
15
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useContext","FontColorActionContext","useFontColorPicker","context","Error"],"sources":["useFontColorPicker.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { FontColorActionContext } from \"~/context/FontColorActionContext.js\";\n\nexport function useFontColorPicker() {\n const context = useContext(FontColorActionContext);\n if (!context) {\n throw Error(\n `Missing FontColorActionContext in the component hierarchy. Are you using \"useFontColorPicker()\" in the right place?`\n );\n }\n\n return context;\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,sBAAsB;AAE/B,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACjC,MAAMC,OAAO,GAAGH,UAAU,CAACC,sBAAsB,CAAC;EAClD,IAAI,CAACE,OAAO,EAAE;IACV,MAAMC,KAAK,CACP,qHACJ,CAAC;EACL;EAEA,OAAOD,OAAO;AAClB","ignoreList":[]}
|
package/hooks/useIsMounted.js
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.useIsMounted = useIsMounted;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
function useIsMounted() {
|
|
9
|
-
var isMounted = (0, _react.useRef)(true);
|
|
10
|
-
(0, _react.useEffect)(function () {
|
|
11
|
-
return function () {
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
export function useIsMounted() {
|
|
3
|
+
const isMounted = useRef(true);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
return () => {
|
|
12
6
|
isMounted.current = false;
|
|
13
7
|
};
|
|
14
8
|
}, []);
|
|
15
|
-
return
|
|
16
|
-
return isMounted.current;
|
|
17
|
-
};
|
|
9
|
+
return () => isMounted.current;
|
|
18
10
|
}
|
|
19
11
|
|
|
20
12
|
//# sourceMappingURL=useIsMounted.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","useIsMounted","isMounted","current"],"sources":["useIsMounted.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nexport function useIsMounted() {\n const isMounted = useRef(true);\n\n useEffect(() => {\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n return () => isMounted.current;\n}\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,OAAO,SAASC,YAAYA,CAAA,EAAG;EAC3B,MAAMC,SAAS,GAAGF,MAAM,CAAC,IAAI,CAAC;EAE9BD,SAAS,CAAC,MAAM;IACZ,OAAO,MAAM;MACTG,SAAS,CAACC,OAAO,GAAG,KAAK;IAC7B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO,MAAMD,SAAS,CAACC,OAAO;AAClC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RichTextEditorContext } from "../context/RichTextEditorContext";
|
|
1
|
+
import { RichTextEditorContext } from "../context/RichTextEditorContext.js";
|
|
2
2
|
export declare function useRichTextEditor(): RichTextEditorContext;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useRichTextEditor = useRichTextEditor;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _RichTextEditorContext = require("../context/RichTextEditorContext");
|
|
9
|
-
function useRichTextEditor() {
|
|
10
|
-
var context = (0, _react.useContext)(_RichTextEditorContext.RichTextEditorContext);
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { RichTextEditorContext } from "../context/RichTextEditorContext.js";
|
|
3
|
+
export function useRichTextEditor() {
|
|
4
|
+
const context = useContext(RichTextEditorContext);
|
|
11
5
|
if (!context) {
|
|
12
|
-
throw Error(
|
|
6
|
+
throw Error(`Missing RichTextEditorContext in the component hierarchy. Are you using "useRichTextEditor()" in the right place?`);
|
|
13
7
|
}
|
|
14
8
|
return context;
|
|
15
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useContext","RichTextEditorContext","useRichTextEditor","context","Error"],"sources":["useRichTextEditor.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { RichTextEditorContext } from \"~/context/RichTextEditorContext.js\";\n\nexport function useRichTextEditor() {\n const context = useContext(RichTextEditorContext);\n if (!context) {\n throw Error(\n `Missing RichTextEditorContext in the component hierarchy. Are you using \"useRichTextEditor()\" in the right place?`\n );\n }\n\n return context;\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,qBAAqB;AAE9B,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EAChC,MAAMC,OAAO,GAAGH,UAAU,CAACC,qBAAqB,CAAC;EACjD,IAAI,CAACE,OAAO,EAAE;IACV,MAAMC,KAAK,CACP,mHACJ,CAAC;EACL;EAEA,OAAOD,OAAO;AAClB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useTextAlignmentAction(): import("
|
|
1
|
+
export declare function useTextAlignmentAction(): import("~/context/TextAlignmentActionContextProps.js").TextAlignmentActionContextProps;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useTextAlignmentAction = useTextAlignmentAction;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _TextAlignmentActionContextProps = require("../context/TextAlignmentActionContextProps");
|
|
9
|
-
function useTextAlignmentAction() {
|
|
10
|
-
var context = (0, _react.useContext)(_TextAlignmentActionContextProps.TextAlignmentActionContext);
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { TextAlignmentActionContext } from "../context/TextAlignmentActionContextProps.js";
|
|
3
|
+
export function useTextAlignmentAction() {
|
|
4
|
+
const context = useContext(TextAlignmentActionContext);
|
|
11
5
|
if (!context) {
|
|
12
|
-
throw Error(
|
|
6
|
+
throw Error(`Missing TextAlignmentActionContext in the component hierarchy. Are you using "useTextAlignmentAction()" in the right place?`);
|
|
13
7
|
}
|
|
14
8
|
return context;
|
|
15
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useContext","TextAlignmentActionContext","useTextAlignmentAction","context","Error"],"sources":["useTextAlignmentAction.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { TextAlignmentActionContext } from \"~/context/TextAlignmentActionContextProps.js\";\n\nexport function useTextAlignmentAction() {\n const context = useContext(TextAlignmentActionContext);\n if (!context) {\n throw Error(\n `Missing TextAlignmentActionContext in the component hierarchy. Are you using \"useTextAlignmentAction()\" in the right place?`\n );\n }\n\n return context;\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,0BAA0B;AAEnC,OAAO,SAASC,sBAAsBA,CAAA,EAAG;EACrC,MAAMC,OAAO,GAAGH,UAAU,CAACC,0BAA0B,CAAC;EACtD,IAAI,CAACE,OAAO,EAAE;IACV,MAAMC,KAAK,CACP,6HACJ,CAAC;EACL;EAEA,OAAOD,OAAO;AAClB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useTypographyAction(): import("
|
|
1
|
+
export declare function useTypographyAction(): import("~/context/TypographyActionContext.js").TypographyActionContextProps;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useTypographyAction = useTypographyAction;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _TypographyActionContext = require("../context/TypographyActionContext");
|
|
9
|
-
function useTypographyAction() {
|
|
10
|
-
var context = (0, _react.useContext)(_TypographyActionContext.TypographyActionContext);
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { TypographyActionContext } from "../context/TypographyActionContext.js";
|
|
3
|
+
export function useTypographyAction() {
|
|
4
|
+
const context = useContext(TypographyActionContext);
|
|
11
5
|
if (!context) {
|
|
12
|
-
throw Error(
|
|
6
|
+
throw Error(`Missing TypographyActionContext in the component hierarchy. Are you using "useTypographyAction()" in the right place?`);
|
|
13
7
|
}
|
|
14
8
|
return context;
|
|
15
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useContext","TypographyActionContext","useTypographyAction","context","Error"],"sources":["useTypographyAction.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { TypographyActionContext } from \"~/context/TypographyActionContext.js\";\n\nexport function useTypographyAction() {\n const context = useContext(TypographyActionContext);\n if (!context) {\n throw Error(\n `Missing TypographyActionContext in the component hierarchy. Are you using \"useTypographyAction()\" in the right place?`\n );\n }\n\n return context;\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,uBAAuB;AAEhC,OAAO,SAASC,mBAAmBA,CAAA,EAAG;EAClC,MAAMC,OAAO,GAAGH,UAAU,CAACC,uBAAuB,CAAC;EACnD,IAAI,CAACE,OAAO,EAAE;IACV,MAAMC,KAAK,CACP,uHACJ,CAAC;EACL;EAEA,OAAOD,OAAO;AAClB","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,38 +1,33 @@
|
|
|
1
|
-
export { LexicalHtmlRenderer } from "./components/LexicalHtmlRenderer";
|
|
2
|
-
export * from "./hooks";
|
|
3
|
-
export { Divider } from "./ui/Divider";
|
|
4
|
-
export { DropDownItem } from "./ui/DropDown";
|
|
5
|
-
export { DropDown } from "./ui/DropDown";
|
|
6
|
-
export { BoldAction } from "./components/ToolbarActions/BoldAction";
|
|
7
|
-
export { BulletListAction } from "./components/ToolbarActions/BulletListAction";
|
|
8
|
-
export { CodeHighlightAction } from "./components/ToolbarActions/CodeHighlightAction";
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export {
|
|
34
|
-
export { generateInitialLexicalValue } from "./utils/generateInitialLexicalValue";
|
|
35
|
-
export { isValidLexicalData } from "./utils/isValidLexicalData";
|
|
36
|
-
export * from "./commands";
|
|
37
|
-
export * as types from "./types";
|
|
38
|
-
export { LexicalEditorConfig, useLexicalEditorConfig } from "./components/LexicalEditorConfig/LexicalEditorConfig";
|
|
1
|
+
export { LexicalHtmlRenderer } from "./components/LexicalHtmlRenderer.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { Divider } from "./ui/Divider.js";
|
|
4
|
+
export { DropDownItem } from "./ui/DropDown.js";
|
|
5
|
+
export { DropDown } from "./ui/DropDown.js";
|
|
6
|
+
export { BoldAction } from "./components/ToolbarActions/BoldAction.js";
|
|
7
|
+
export { BulletListAction } from "./components/ToolbarActions/BulletListAction.js";
|
|
8
|
+
export { CodeHighlightAction } from "./components/ToolbarActions/CodeHighlightAction.js";
|
|
9
|
+
export { FontColorAction } from "./components/ToolbarActions/FontColorAction.js";
|
|
10
|
+
export { ItalicAction } from "./components/ToolbarActions/ItalicAction.js";
|
|
11
|
+
export { LinkAction } from "./components/ToolbarActions/LinkAction.js";
|
|
12
|
+
export { NumberedListAction } from "./components/ToolbarActions/NumberedListAction.js";
|
|
13
|
+
export { QuoteAction } from "./components/ToolbarActions/QuoteAction.js";
|
|
14
|
+
export { UnderlineAction } from "./components/ToolbarActions/UnderlineAction.js";
|
|
15
|
+
export { TypographyAction } from "./components/ToolbarActions/TypographyAction.js";
|
|
16
|
+
export { TextAlignmentAction } from "./components/ToolbarActions/TextAlignmentAction.js";
|
|
17
|
+
export { ImageAction } from "./components/ToolbarActions/ImageAction.js";
|
|
18
|
+
export { StaticToolbar } from "./components/Toolbar/StaticToolbar.js";
|
|
19
|
+
export { RichTextEditor } from "./components/Editor/RichTextEditor.js";
|
|
20
|
+
export { LinkPlugin } from "./plugins/LinkPlugin/LinkPlugin.js";
|
|
21
|
+
export { FloatingLinkEditorPlugin } from "./plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js";
|
|
22
|
+
export { CodeHighlightPlugin } from "./plugins/CodeHighlightPlugin/CodeHighlightPlugin.js";
|
|
23
|
+
export { BlurEventPlugin } from "./plugins/BlurEventPlugin/BlurEventPlugin.js";
|
|
24
|
+
export { FontColorPlugin } from "./plugins/FontColorPlugin/FontColorPlugin.js";
|
|
25
|
+
export { TypographyPlugin } from "./plugins/TypographyPlugin/TypographyPlugin.js";
|
|
26
|
+
export { QuotePlugin } from "./plugins/QuoteNodePlugin/QuoteNodePlugin.js";
|
|
27
|
+
export { ListPlugin } from "./plugins/ListPLugin/ListPlugin.js";
|
|
28
|
+
export { ImagesPlugin } from "./plugins/ImagesPlugin/ImagesPlugin.js";
|
|
29
|
+
export { StateHandlingPlugin } from "./plugins/StateHandlingPlugin.js";
|
|
30
|
+
export { isValidLexicalData } from "./utils/isValidLexicalData.js";
|
|
31
|
+
export * from "./commands/index.js";
|
|
32
|
+
export * as types from "./types.js";
|
|
33
|
+
export { LexicalEditorConfig, useLexicalEditorConfig } from "./components/LexicalEditorConfig/LexicalEditorConfig.js";
|