@editorcn/editor 0.3.4 → 0.3.6
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/index.cjs +4 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/style.css +1405 -1362
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1079,7 +1079,7 @@ import { useEditorState as useEditorState2 } from "@tiptap/react";
|
|
|
1079
1079
|
import "react";
|
|
1080
1080
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1081
1081
|
var RichTextEditorControl = ({
|
|
1082
|
-
active,
|
|
1082
|
+
active = false,
|
|
1083
1083
|
interactive: _interactive = true,
|
|
1084
1084
|
className,
|
|
1085
1085
|
children,
|
|
@@ -1130,12 +1130,9 @@ var createControl = ({
|
|
|
1130
1130
|
const Control = ({ className }) => {
|
|
1131
1131
|
const { editor, labels, icons } = useRichTextEditorContext();
|
|
1132
1132
|
const ariaLabel = labels[label];
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
});
|
|
1137
|
-
const active = editorState?.active ?? false;
|
|
1138
|
-
const disabled = editorState?.disabled ?? true;
|
|
1133
|
+
const selector = createSelector(isActive, isDisabled);
|
|
1134
|
+
useEditorState2({ editor: editor ?? null, selector });
|
|
1135
|
+
const { active, disabled } = selector({ editor: editor ?? null });
|
|
1139
1136
|
return /* @__PURE__ */ jsx20(
|
|
1140
1137
|
RichTextEditorControl,
|
|
1141
1138
|
{
|