@uxf/wysiwyg 11.19.0 → 11.21.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/package.json +4 -3
- package/wysiwyg-editor.js +2 -2
- package/wysiwyg-editor.stories.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/wysiwyg",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.21.0",
|
|
4
4
|
"description": "UXF Wysiwyg editor",
|
|
5
5
|
"author": "Robin Dvorak <dvorak@uxf.cz>",
|
|
6
6
|
"homepage": "https://gitlab.com/uxf-npm/wysiwyg",
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
"@udecode/plate-reset-node": "20.7.2",
|
|
28
28
|
"@udecode/plate-select": "20.7.2",
|
|
29
29
|
"@udecode/plate-trailing-block": "20.7.2",
|
|
30
|
-
"@uxf/core": "11.
|
|
31
|
-
"@uxf/
|
|
30
|
+
"@uxf/core": "11.21.0",
|
|
31
|
+
"@uxf/core-react": "11.21.0",
|
|
32
|
+
"@uxf/ui": "11.21.0",
|
|
32
33
|
"slate": "0.90.0",
|
|
33
34
|
"slate-history": "0.86.0",
|
|
34
35
|
"slate-hyperscript": "0.77.0",
|
package/wysiwyg-editor.js
CHANGED
|
@@ -6,8 +6,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.WysiwygEditor = void 0;
|
|
8
8
|
const plate_core_1 = require("@udecode/plate-core");
|
|
9
|
+
const use_is_mounted_1 = require("@uxf/core-react/hooks/use-is-mounted");
|
|
9
10
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
10
|
-
const useIsMounted_1 = require("@uxf/core/hooks/useIsMounted");
|
|
11
11
|
const loader_1 = require("@uxf/ui/loader");
|
|
12
12
|
const react_1 = __importDefault(require("react"));
|
|
13
13
|
const context_1 = require("./translations/context");
|
|
@@ -31,7 +31,7 @@ const Editor = (props) => {
|
|
|
31
31
|
};
|
|
32
32
|
const WysiwygEditor = (props) => {
|
|
33
33
|
var _a, _b, _c;
|
|
34
|
-
const isMounted = (0,
|
|
34
|
+
const isMounted = (0, use_is_mounted_1.useIsMounted)();
|
|
35
35
|
if (!isMounted) {
|
|
36
36
|
return (react_1.default.createElement("div", { className: `${CLASS_NAME} ${CLASS_NAME}--${classes_1.CLASSES.IS_LOADING} ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}` },
|
|
37
37
|
react_1.default.createElement(loader_1.Loader, { className: `${CLASS_NAME}__loader` })));
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.SelectedPlugins = exports.Playground = exports.initialValue = void 0;
|
|
28
|
-
const show_1 = require("@uxf/core/components/show");
|
|
29
|
-
const
|
|
28
|
+
const show_1 = require("@uxf/core-react/components/show");
|
|
29
|
+
const use_is_mounted_1 = require("@uxf/core-react/hooks/use-is-mounted");
|
|
30
30
|
const wysiwyg_1 = require("@uxf/wysiwyg");
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
exports.initialValue = [
|
|
@@ -145,7 +145,7 @@ function Playground() {
|
|
|
145
145
|
}),
|
|
146
146
|
(0, wysiwyg_1.createHighlightPluginWithUi)("red"),
|
|
147
147
|
]);
|
|
148
|
-
const isMounted = (0,
|
|
148
|
+
const isMounted = (0, use_is_mounted_1.useIsMounted)();
|
|
149
149
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
150
150
|
react_1.default.createElement(wysiwyg_1.WysiwygEditor, { id: "editor", initialValue: exports.initialValue, onChange: setValue, plugins: plugins }),
|
|
151
151
|
react_1.default.createElement("div", { className: "relative mt-4" },
|
|
@@ -178,7 +178,7 @@ function SelectedPlugins() {
|
|
|
178
178
|
}),
|
|
179
179
|
(0, wysiwyg_1.createHighlightPluginWithUi)("red"),
|
|
180
180
|
]);
|
|
181
|
-
const isMounted = (0,
|
|
181
|
+
const isMounted = (0, use_is_mounted_1.useIsMounted)();
|
|
182
182
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
183
183
|
react_1.default.createElement(wysiwyg_1.WysiwygEditor, { id: "editor", initialValue: _initialValues, onChange: setValue, plugins: plugins }),
|
|
184
184
|
react_1.default.createElement("div", { className: "relative mt-4" },
|