@uxf/wysiwyg 11.74.0 → 11.74.2
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/components.d.ts +7 -0
- package/components.js +34 -0
- package/config/icons-config.d.ts +2 -0
- package/config/icons-config.js +5 -0
- package/config/icons.d.ts +183 -0
- package/config/icons.js +51 -0
- package/create-all-plugins-with-ui.d.ts +64 -0
- package/create-all-plugins-with-ui.js +127 -0
- package/create-plugins-with-ui.d.ts +4 -0
- package/create-plugins-with-ui.js +47 -0
- package/hooks.d.ts +9 -0
- package/hooks.js +20 -0
- package/index.d.ts +6 -0
- package/index.js +38 -0
- package/package.json +3 -3
- package/plugins/blockquote/create-blockquote-plugin.d.ts +3 -0
- package/plugins/blockquote/create-blockquote-plugin.js +9 -0
- package/plugins/blockquote/types.d.ts +2 -0
- package/plugins/blockquote/types.js +6 -0
- package/plugins/button/constants.d.ts +2 -0
- package/plugins/button/constants.js +5 -0
- package/plugins/button/create-button-plugin.d.ts +2 -0
- package/plugins/button/create-button-plugin.js +11 -0
- package/plugins/button/index.d.ts +3 -0
- package/plugins/button/index.js +23 -0
- package/plugins/button/transforms/get-active-button.d.ts +2 -0
- package/plugins/button/transforms/get-active-button.js +9 -0
- package/plugins/button/transforms/index.d.ts +4 -0
- package/plugins/button/transforms/index.js +11 -0
- package/plugins/button/transforms/insert-button.d.ts +2 -0
- package/plugins/button/transforms/insert-button.js +16 -0
- package/plugins/button/transforms/is-button-active.d.ts +2 -0
- package/plugins/button/transforms/is-button-active.js +7 -0
- package/plugins/button/transforms/remove-selected-button.d.ts +2 -0
- package/plugins/button/transforms/remove-selected-button.js +13 -0
- package/plugins/button/transforms/update-button.d.ts +2 -0
- package/plugins/button/transforms/update-button.js +9 -0
- package/plugins/embedded/utils.d.ts +1 -0
- package/plugins/embedded/utils.js +7 -0
- package/plugins/embedded/video/create-video-plugin.d.ts +4 -0
- package/plugins/embedded/video/create-video-plugin.js +19 -0
- package/plugins/embedded/video/get-active-video.d.ts +2 -0
- package/plugins/embedded/video/get-active-video.js +9 -0
- package/plugins/embedded/video/insert-video.d.ts +2 -0
- package/plugins/embedded/video/insert-video.js +19 -0
- package/plugins/embedded/video/update-video.d.ts +2 -0
- package/plugins/embedded/video/update-video.js +12 -0
- package/plugins/exit-break/create-exit-break-plugin.d.ts +3 -0
- package/plugins/exit-break/create-exit-break-plugin.js +30 -0
- package/plugins/heading/constants.d.ts +8 -0
- package/plugins/heading/constants.js +11 -0
- package/plugins/heading/create-headings-plugin.d.ts +8 -0
- package/plugins/heading/create-headings-plugin.js +40 -0
- package/plugins/highlight/createHighlightPlugin.d.ts +3 -0
- package/plugins/highlight/createHighlightPlugin.js +27 -0
- package/plugins/highlight/types.d.ts +10 -0
- package/plugins/highlight/types.js +4 -0
- package/plugins/image/create-image-plugin.d.ts +6 -0
- package/plugins/image/create-image-plugin.js +105 -0
- package/plugins/image/hooks/use-image-handlers.d.ts +5 -0
- package/plugins/image/hooks/use-image-handlers.js +19 -0
- package/plugins/image/transforms/get-active-image.d.ts +2 -0
- package/plugins/image/transforms/get-active-image.js +9 -0
- package/plugins/image/transforms/insert-image.d.ts +3 -0
- package/plugins/image/transforms/insert-image.js +19 -0
- package/plugins/image/transforms/is-image-active.d.ts +2 -0
- package/plugins/image/transforms/is-image-active.js +7 -0
- package/plugins/image/transforms/remove-selected-image.d.ts +2 -0
- package/plugins/image/transforms/remove-selected-image.js +13 -0
- package/plugins/image/transforms/update-image.d.ts +3 -0
- package/plugins/image/transforms/update-image.js +12 -0
- package/plugins/image/types.d.ts +12 -0
- package/plugins/image/types.js +6 -0
- package/plugins/image/utils/is-image-url.d.ts +2 -0
- package/plugins/image/utils/is-image-url.js +135 -0
- package/plugins/image/with-image.d.ts +7 -0
- package/plugins/image/with-image.js +19 -0
- package/plugins/image/with-paste-image-url.d.ts +7 -0
- package/plugins/image/with-paste-image-url.js +36 -0
- package/plugins/image/with-paste-image.d.ts +7 -0
- package/plugins/image/with-paste-image.js +49 -0
- package/plugins/link/constants.d.ts +2 -0
- package/plugins/link/constants.js +6 -0
- package/plugins/link/create-link-plugin.d.ts +3 -0
- package/plugins/link/create-link-plugin.js +15 -0
- package/plugins/link/floating-link-wrapper.d.ts +11 -0
- package/plugins/link/floating-link-wrapper.js +26 -0
- package/plugins/link/hooks/index.d.ts +4 -0
- package/plugins/link/hooks/index.js +11 -0
- package/plugins/link/hooks/use-link-actions.d.ts +12 -0
- package/plugins/link/hooks/use-link-actions.js +48 -0
- package/plugins/link/hooks/use-link-cancel-on-escape.d.ts +1 -0
- package/plugins/link/hooks/use-link-cancel-on-escape.js +5 -0
- package/plugins/link/hooks/use-link-submit-on-enter.d.ts +1 -0
- package/plugins/link/hooks/use-link-submit-on-enter.js +23 -0
- package/plugins/link/transforms/get-active-link.d.ts +3 -0
- package/plugins/link/transforms/get-active-link.js +17 -0
- package/plugins/link/transforms/insert-link.d.ts +2 -0
- package/plugins/link/transforms/insert-link.js +27 -0
- package/plugins/link/transforms/is-link-selected.d.ts +2 -0
- package/plugins/link/transforms/is-link-selected.js +15 -0
- package/plugins/link/transforms/submit-link.d.ts +8 -0
- package/plugins/link/transforms/submit-link.js +36 -0
- package/plugins/link/transforms/trigger-link-insert-or-edit.d.ts +2 -0
- package/plugins/link/transforms/trigger-link-insert-or-edit.js +6 -0
- package/plugins/link/transforms/unwrap-link.d.ts +2 -0
- package/plugins/link/transforms/unwrap-link.js +10 -0
- package/plugins/link/types.d.ts +5 -0
- package/plugins/link/types.js +2 -0
- package/plugins/list/constants.d.ts +4 -0
- package/plugins/list/constants.js +14 -0
- package/plugins/list/create-list-plugin.d.ts +4 -0
- package/plugins/list/create-list-plugin.js +16 -0
- package/plugins/mark-bold/create-bold-plugin.d.ts +3 -0
- package/plugins/mark-bold/create-bold-plugin.js +6 -0
- package/plugins/mark-bold/types.d.ts +2 -0
- package/plugins/mark-bold/types.js +6 -0
- package/plugins/mark-code/create-code-plugin.d.ts +3 -0
- package/plugins/mark-code/create-code-plugin.js +6 -0
- package/plugins/mark-code/types.d.ts +2 -0
- package/plugins/mark-code/types.js +6 -0
- package/plugins/mark-italic/create-italic-plugin.d.ts +3 -0
- package/plugins/mark-italic/create-italic-plugin.js +6 -0
- package/plugins/mark-italic/types.d.ts +2 -0
- package/plugins/mark-italic/types.js +6 -0
- package/plugins/mark-underline/create-underline-plugin.d.ts +3 -0
- package/plugins/mark-underline/create-underline-plugin.js +6 -0
- package/plugins/mark-underline/types.d.ts +2 -0
- package/plugins/mark-underline/types.js +6 -0
- package/plugins/node-id/add-ids-to-nodes.d.ts +2 -0
- package/plugins/node-id/add-ids-to-nodes.js +22 -0
- package/plugins/node-id/create-node-id-plugin.d.ts +3 -0
- package/plugins/node-id/create-node-id-plugin.js +6 -0
- package/plugins/paragraph/create-paragraph-plugin.d.ts +3 -0
- package/plugins/paragraph/create-paragraph-plugin.js +9 -0
- package/plugins/paragraph/types.d.ts +2 -0
- package/plugins/paragraph/types.js +6 -0
- package/plugins/reset-node/create-reset-node.d.ts +3 -0
- package/plugins/reset-node/create-reset-node.js +28 -0
- package/plugins/select-on-backspace/create-select-on-backspace-plugin.d.ts +3 -0
- package/plugins/select-on-backspace/create-select-on-backspace-plugin.js +14 -0
- package/plugins/soft-break/create-soft-break-plugin.d.ts +3 -0
- package/plugins/soft-break/create-soft-break-plugin.js +22 -0
- package/plugins/trailing-block/create-trailing-block-plugin.d.ts +3 -0
- package/plugins/trailing-block/create-trailing-block-plugin.js +6 -0
- package/serializers/serialize-to-plaintext.d.ts +2 -0
- package/serializers/serialize-to-plaintext.js +8 -0
- package/translations/cs.json +134 -0
- package/translations/de.json +134 -0
- package/translations/en.json +134 -0
- package/translations/sk.json +134 -0
- package/types.d.ts +118 -0
- package/types.js +2 -0
- package/ui/blockquote-element.d.ts +2 -0
- package/ui/blockquote-element.js +13 -0
- package/ui/bold-mark.d.ts +2 -0
- package/ui/bold-mark.js +13 -0
- package/ui/button/button-element.d.ts +2 -0
- package/ui/button/button-element.js +54 -0
- package/ui/button/index.d.ts +1 -0
- package/ui/button/index.js +5 -0
- package/ui/button/insert-button-modal-content.d.ts +8 -0
- package/ui/button/insert-button-modal-content.js +81 -0
- package/ui/code-mark.d.ts +2 -0
- package/ui/code-mark.js +13 -0
- package/ui/components/element/element-action-buttons.d.ts +9 -0
- package/ui/components/element/element-action-buttons.js +22 -0
- package/ui/components/element/element-with-action-buttons.d.ts +10 -0
- package/ui/components/element/element-with-action-buttons.js +17 -0
- package/ui/components/modal/modal-button-cancel.d.ts +9 -0
- package/ui/components/modal/modal-button-cancel.js +45 -0
- package/ui/components/modal/modal-button-submit.d.ts +6 -0
- package/ui/components/modal/modal-button-submit.js +12 -0
- package/ui/components/modal/modal-buttons.d.ts +11 -0
- package/ui/components/modal/modal-buttons.js +16 -0
- package/ui/components/modal/modal-content.d.ts +6 -0
- package/ui/components/modal/modal-content.js +14 -0
- package/ui/create-uxf-ui.d.ts +21 -0
- package/ui/create-uxf-ui.js +51 -0
- package/ui/floating-link.d.ts +2 -0
- package/ui/floating-link.js +110 -0
- package/ui/heading-elements.d.ts +7 -0
- package/ui/heading-elements.js +38 -0
- package/ui/highlight-mark.d.ts +3 -0
- package/ui/highlight-mark.js +13 -0
- package/ui/image/image-element.d.ts +2 -0
- package/ui/image/image-element.js +53 -0
- package/ui/image/insert-image-modal-content.d.ts +8 -0
- package/ui/image/insert-image-modal-content.js +89 -0
- package/ui/italic-mark.d.ts +2 -0
- package/ui/italic-mark.js +13 -0
- package/ui/link-element.d.ts +3 -0
- package/ui/link-element.js +14 -0
- package/ui/list-item-element.d.ts +2 -0
- package/ui/list-item-element.js +13 -0
- package/ui/list-ordered-element.d.ts +2 -0
- package/ui/list-ordered-element.js +13 -0
- package/ui/list-unordered-element.d.ts +2 -0
- package/ui/list-unordered-element.js +13 -0
- package/ui/paragraph-element.d.ts +2 -0
- package/ui/paragraph-element.js +13 -0
- package/ui/toolbar/buttons/button-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/button-toolbar-button.js +20 -0
- package/ui/toolbar/buttons/element-toolbar-button.d.ts +12 -0
- package/ui/toolbar/buttons/element-toolbar-button.js +25 -0
- package/ui/toolbar/buttons/image-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/image-toolbar-button.js +20 -0
- package/ui/toolbar/buttons/link-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/link-toolbar-button.js +29 -0
- package/ui/toolbar/buttons/list-toolbar-button.d.ts +13 -0
- package/ui/toolbar/buttons/list-toolbar-button.js +27 -0
- package/ui/toolbar/buttons/mark-toolbar-button.d.ts +13 -0
- package/ui/toolbar/buttons/mark-toolbar-button.js +25 -0
- package/ui/toolbar/buttons/modal-toolbar-button.d.ts +15 -0
- package/ui/toolbar/buttons/modal-toolbar-button.js +22 -0
- package/ui/toolbar/buttons/toolbar-button.d.ts +15 -0
- package/ui/toolbar/buttons/toolbar-button.js +35 -0
- package/ui/toolbar/buttons/undo-redo-button-group.d.ts +8 -0
- package/ui/toolbar/buttons/undo-redo-button-group.js +64 -0
- package/ui/toolbar/buttons/video-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/video-toolbar-button.js +20 -0
- package/ui/toolbar/toolbar.d.ts +3 -0
- package/ui/toolbar/toolbar.js +77 -0
- package/ui/toolbar/types.d.ts +8 -0
- package/ui/toolbar/types.js +2 -0
- package/ui/underline-mark.d.ts +2 -0
- package/ui/underline-mark.js +13 -0
- package/ui/utils.d.ts +2 -0
- package/ui/utils.js +13 -0
- package/ui/video/insert-video-modal-content.d.ts +8 -0
- package/ui/video/insert-video-modal-content.js +80 -0
- package/ui/video/video-element.d.ts +2 -0
- package/ui/video/video-element.js +55 -0
- package/utils/get-video-meta-data.d.ts +2 -0
- package/utils/get-video-meta-data.js +41 -0
- package/utils/url-helper.d.ts +7 -0
- package/utils/url-helper.js +15 -0
- package/utils/url-helper.test.d.ts +1 -0
- package/utils/url-helper.test.js +37 -0
- package/utils.d.ts +30 -0
- package/utils.js +88 -0
- package/wysiwyg-editor.d.ts +15 -0
- package/wysiwyg-editor.js +42 -0
- package/wysiwyg-editor.stories.d.ts +5 -0
- package/wysiwyg-editor.stories.js +193 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerLinkInsertOrEdit = void 0;
|
|
4
|
+
const plate_link_1 = require("@udecode/plate-link");
|
|
5
|
+
const triggerLinkInsertOrEdit = (editor, focused = false) => (0, plate_link_1.triggerFloatingLink)(editor, { focused });
|
|
6
|
+
exports.triggerLinkInsertOrEdit = triggerLinkInsertOrEdit;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeLink = void 0;
|
|
4
|
+
const plate_link_1 = require("@udecode/plate-link");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
const removeLink = (editor) => {
|
|
7
|
+
(0, plate_link_1.unwrapLink)(editor);
|
|
8
|
+
(0, utils_1.focusEditor)(editor);
|
|
9
|
+
};
|
|
10
|
+
exports.removeLink = removeLink;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toggleList = exports.getListItemEntry = exports.ELEMENT_UL = exports.ELEMENT_OL = exports.ELEMENT_LIC = exports.ELEMENT_LI = exports.LIST_UNORDERED_TYPE = exports.LIST_ORDERED_TYPE = exports.LIST_PLUGIN_KEY = void 0;
|
|
4
|
+
const plate_list_1 = require("@udecode/plate-list");
|
|
5
|
+
exports.LIST_PLUGIN_KEY = "list";
|
|
6
|
+
exports.LIST_ORDERED_TYPE = plate_list_1.ELEMENT_OL;
|
|
7
|
+
exports.LIST_UNORDERED_TYPE = plate_list_1.ELEMENT_UL;
|
|
8
|
+
var plate_list_2 = require("@udecode/plate-list");
|
|
9
|
+
Object.defineProperty(exports, "ELEMENT_LI", { enumerable: true, get: function () { return plate_list_2.ELEMENT_LI; } });
|
|
10
|
+
Object.defineProperty(exports, "ELEMENT_LIC", { enumerable: true, get: function () { return plate_list_2.ELEMENT_LIC; } });
|
|
11
|
+
Object.defineProperty(exports, "ELEMENT_OL", { enumerable: true, get: function () { return plate_list_2.ELEMENT_OL; } });
|
|
12
|
+
Object.defineProperty(exports, "ELEMENT_UL", { enumerable: true, get: function () { return plate_list_2.ELEMENT_UL; } });
|
|
13
|
+
Object.defineProperty(exports, "getListItemEntry", { enumerable: true, get: function () { return plate_list_2.getListItemEntry; } });
|
|
14
|
+
Object.defineProperty(exports, "toggleList", { enumerable: true, get: function () { return plate_list_2.toggleList; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createListPlugin = exports.toggleList = exports.getListItemEntry = void 0;
|
|
4
|
+
const plate_list_1 = require("@udecode/plate-list");
|
|
5
|
+
const types_1 = require("../paragraph/types");
|
|
6
|
+
var plate_list_2 = require("@udecode/plate-list");
|
|
7
|
+
Object.defineProperty(exports, "getListItemEntry", { enumerable: true, get: function () { return plate_list_2.getListItemEntry; } });
|
|
8
|
+
Object.defineProperty(exports, "toggleList", { enumerable: true, get: function () { return plate_list_2.toggleList; } });
|
|
9
|
+
const createListPlugin = () => (0, plate_list_1.createListPlugin)({
|
|
10
|
+
inject: {
|
|
11
|
+
props: {
|
|
12
|
+
validTypes: [types_1.PARAGRAPH_PLUGIN_KEY],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
exports.createListPlugin = createListPlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBoldPlugin = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
const createBoldPlugin = () => (0, plate_basic_marks_1.createBoldPlugin)();
|
|
6
|
+
exports.createBoldPlugin = createBoldPlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BOLD_PLUGIN_TYPE = exports.BOLD_PLUGIN_KEY = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
exports.BOLD_PLUGIN_KEY = plate_basic_marks_1.MARK_BOLD;
|
|
6
|
+
exports.BOLD_PLUGIN_TYPE = plate_basic_marks_1.MARK_BOLD;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCodePlugin = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
const createCodePlugin = () => (0, plate_basic_marks_1.createCodePlugin)();
|
|
6
|
+
exports.createCodePlugin = createCodePlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CODE_PLUGIN_TYPE = exports.CODE_PLUGIN_KEY = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
exports.CODE_PLUGIN_KEY = plate_basic_marks_1.MARK_CODE;
|
|
6
|
+
exports.CODE_PLUGIN_TYPE = plate_basic_marks_1.MARK_CODE;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createItalicPlugin = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
const createItalicPlugin = () => (0, plate_basic_marks_1.createItalicPlugin)();
|
|
6
|
+
exports.createItalicPlugin = createItalicPlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ITALIC_PLUGIN_TYPE = exports.ITALIC_PLUGIN_KEY = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
exports.ITALIC_PLUGIN_KEY = plate_basic_marks_1.MARK_ITALIC;
|
|
6
|
+
exports.ITALIC_PLUGIN_TYPE = plate_basic_marks_1.MARK_ITALIC;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createUnderlinePlugin = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
const createUnderlinePlugin = () => (0, plate_basic_marks_1.createUnderlinePlugin)();
|
|
6
|
+
exports.createUnderlinePlugin = createUnderlinePlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UNDER_LINE_PLUGIN_TYPE = exports.UNDER_LINE_PLUGIN_KEY = void 0;
|
|
4
|
+
const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
|
|
5
|
+
exports.UNDER_LINE_PLUGIN_KEY = plate_basic_marks_1.MARK_UNDERLINE;
|
|
6
|
+
exports.UNDER_LINE_PLUGIN_TYPE = plate_basic_marks_1.MARK_UNDERLINE;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addIdsToNodes = void 0;
|
|
4
|
+
const addIdsToNodes = (nodes) => {
|
|
5
|
+
return nodes.map((node) => {
|
|
6
|
+
let id = node.id;
|
|
7
|
+
let children = node.children;
|
|
8
|
+
if (!id && !node.text) {
|
|
9
|
+
id = Math.random().toString(36).substring(2, 7);
|
|
10
|
+
}
|
|
11
|
+
if (node.children) {
|
|
12
|
+
children = (0, exports.addIdsToNodes)(node.children);
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
type: node.type,
|
|
16
|
+
id: id,
|
|
17
|
+
...node,
|
|
18
|
+
children,
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.addIdsToNodes = addIdsToNodes;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createNodeIdPlugin = void 0;
|
|
4
|
+
const plate_node_id_1 = require("@udecode/plate-node-id");
|
|
5
|
+
const createNodeIdPlugin = () => (0, plate_node_id_1.createNodeIdPlugin)();
|
|
6
|
+
exports.createNodeIdPlugin = createNodeIdPlugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createParagraphPlugin = void 0;
|
|
4
|
+
const plate_paragraph_1 = require("@udecode/plate-paragraph");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const createParagraphPlugin = () => (0, plate_paragraph_1.createParagraphPlugin)({
|
|
7
|
+
type: types_1.PARAGRAPH_PLUGIN_TYPE,
|
|
8
|
+
});
|
|
9
|
+
exports.createParagraphPlugin = createParagraphPlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PARAGRAPH_PLUGIN_TYPE = exports.PARAGRAPH_PLUGIN_KEY = void 0;
|
|
4
|
+
const plate_paragraph_1 = require("@udecode/plate-paragraph");
|
|
5
|
+
exports.PARAGRAPH_PLUGIN_KEY = plate_paragraph_1.ELEMENT_PARAGRAPH;
|
|
6
|
+
exports.PARAGRAPH_PLUGIN_TYPE = "paragraph";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createResetNodePlugin = void 0;
|
|
4
|
+
const plate_common_1 = require("@udecode/plate-common");
|
|
5
|
+
const plate_reset_node_1 = require("@udecode/plate-reset-node");
|
|
6
|
+
const types_1 = require("../blockquote/types");
|
|
7
|
+
const types_2 = require("../paragraph/types");
|
|
8
|
+
const resetBlockTypesCommonRule = {
|
|
9
|
+
types: [types_1.BLOCKQUOTE_PLUGIN_KEY],
|
|
10
|
+
defaultType: types_2.PARAGRAPH_PLUGIN_KEY,
|
|
11
|
+
};
|
|
12
|
+
const createResetNodePlugin = () => (0, plate_reset_node_1.createResetNodePlugin)({
|
|
13
|
+
options: {
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
...resetBlockTypesCommonRule,
|
|
17
|
+
hotkey: "Enter",
|
|
18
|
+
predicate: plate_common_1.isBlockAboveEmpty,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
...resetBlockTypesCommonRule,
|
|
22
|
+
hotkey: "Backspace",
|
|
23
|
+
predicate: plate_common_1.isSelectionAtBlockStart,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
exports.createResetNodePlugin = createResetNodePlugin;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSelectOnBackspacePlugin = void 0;
|
|
4
|
+
const plate_media_1 = require("@udecode/plate-media");
|
|
5
|
+
const plate_select_1 = require("@udecode/plate-select");
|
|
6
|
+
const types_1 = require("../image/types");
|
|
7
|
+
const createSelectOnBackspacePlugin = () => (0, plate_select_1.createSelectOnBackspacePlugin)({
|
|
8
|
+
options: {
|
|
9
|
+
query: {
|
|
10
|
+
allow: [types_1.IMAGE_PLUGIN_KEY, plate_media_1.ELEMENT_MEDIA_EMBED],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
exports.createSelectOnBackspacePlugin = createSelectOnBackspacePlugin;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSoftBreakPlugin = void 0;
|
|
4
|
+
const plate_break_1 = require("@udecode/plate-break");
|
|
5
|
+
const types_1 = require("../blockquote/types");
|
|
6
|
+
const types_2 = require("../paragraph/types");
|
|
7
|
+
const createSoftBreakPlugin = () => (0, plate_break_1.createSoftBreakPlugin)({
|
|
8
|
+
options: {
|
|
9
|
+
rules: [
|
|
10
|
+
{
|
|
11
|
+
hotkey: "shift+enter",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
hotkey: "enter",
|
|
15
|
+
query: {
|
|
16
|
+
allow: [types_2.PARAGRAPH_PLUGIN_KEY, types_1.BLOCKQUOTE_PLUGIN_KEY],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
exports.createSoftBreakPlugin = createSoftBreakPlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTrailingBlockPlugin = void 0;
|
|
4
|
+
const plate_trailing_block_1 = require("@udecode/plate-trailing-block");
|
|
5
|
+
const createTrailingBlockPlugin = () => (0, plate_trailing_block_1.createTrailingBlockPlugin)();
|
|
6
|
+
exports.createTrailingBlockPlugin = createTrailingBlockPlugin;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serializeToPlaintext = void 0;
|
|
4
|
+
const slate_1 = require("slate");
|
|
5
|
+
const serializeToPlaintext = (nodes, keepIndentation = true) => {
|
|
6
|
+
return nodes.map((n) => slate_1.Node.string(n)).join(keepIndentation ? "\n" : " ");
|
|
7
|
+
};
|
|
8
|
+
exports.serializeToPlaintext = serializeToPlaintext;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"uxf-wysiwyg": {
|
|
3
|
+
"common": {
|
|
4
|
+
"placeholder": "Napište něco hezkého..."
|
|
5
|
+
},
|
|
6
|
+
"components": {
|
|
7
|
+
"modal": {
|
|
8
|
+
"button-cancel": "Zrušit"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"plugins": {
|
|
12
|
+
"formatting": {
|
|
13
|
+
"bold": {
|
|
14
|
+
"tooltip": "Tučné (Ctrl+B)"
|
|
15
|
+
},
|
|
16
|
+
"italic": {
|
|
17
|
+
"tooltip": "Kurzíva (Ctrl+I)"
|
|
18
|
+
},
|
|
19
|
+
"underline": {
|
|
20
|
+
"tooltip": "Podtržení (Ctrl+U)"
|
|
21
|
+
},
|
|
22
|
+
"code": {
|
|
23
|
+
"tooltip": "Kód"
|
|
24
|
+
},
|
|
25
|
+
"highlight": {
|
|
26
|
+
"tooltip": "Zvýraznění (Ctrl+Shift+H)"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"headings": {
|
|
30
|
+
"h1": {
|
|
31
|
+
"tooltip": "Nadpis H1"
|
|
32
|
+
},
|
|
33
|
+
"h2": {
|
|
34
|
+
"tooltip": "Nadpis H2"
|
|
35
|
+
},
|
|
36
|
+
"h3": {
|
|
37
|
+
"tooltip": "Nadpis H3"
|
|
38
|
+
},
|
|
39
|
+
"h4": {
|
|
40
|
+
"tooltip": "Nadpis H4"
|
|
41
|
+
},
|
|
42
|
+
"h5": {
|
|
43
|
+
"tooltip": "Nadpis H5"
|
|
44
|
+
},
|
|
45
|
+
"h6": {
|
|
46
|
+
"tooltip": "Nadpis H6"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"link": {
|
|
50
|
+
"url-address": {
|
|
51
|
+
"invalid": "Neplatná URL adresa",
|
|
52
|
+
"required": "URL adresa je povinná",
|
|
53
|
+
"label": "URL adresa",
|
|
54
|
+
"placeholder": "Zadejte URL adresu"
|
|
55
|
+
},
|
|
56
|
+
"link-text": {
|
|
57
|
+
"label": "Text odkazu",
|
|
58
|
+
"placeholder": "Zadejte text odkazu"
|
|
59
|
+
},
|
|
60
|
+
"open-in-new-tab": "Otevřít v nové záložce",
|
|
61
|
+
"tooltip": "Vložit odkaz",
|
|
62
|
+
"button-save": "Uložit",
|
|
63
|
+
"button-close": "Zavřít"
|
|
64
|
+
},
|
|
65
|
+
"blocks": {
|
|
66
|
+
"quote": {
|
|
67
|
+
"tooltip": "Citace"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"lists": {
|
|
71
|
+
"ul": {
|
|
72
|
+
"tooltip": "Vložit odrážkový seznam"
|
|
73
|
+
},
|
|
74
|
+
"ol": {
|
|
75
|
+
"tooltip": "Vložit číslovaný seznam"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"button": {
|
|
79
|
+
"tooltip": "Vložit tlačítko",
|
|
80
|
+
"button-text": {
|
|
81
|
+
"label": "Text tlačítka",
|
|
82
|
+
"placeholder": "Zadejte text tlačítka",
|
|
83
|
+
"required": "Toto pole je povinné"
|
|
84
|
+
},
|
|
85
|
+
"url-address": {
|
|
86
|
+
"label": "URL adresa",
|
|
87
|
+
"placeholder": "Zadejte URL adresu",
|
|
88
|
+
"required": "Toto pole je povinné"
|
|
89
|
+
},
|
|
90
|
+
"button-insert": "Vložit tlačítko",
|
|
91
|
+
"button-edit": "Upravit tlačítko"
|
|
92
|
+
},
|
|
93
|
+
"image": {
|
|
94
|
+
"tooltip": "Vložit obrázek",
|
|
95
|
+
"alt": {
|
|
96
|
+
"label": "Alt obrázku",
|
|
97
|
+
"placeholder": "Zadejte alt obrázku"
|
|
98
|
+
},
|
|
99
|
+
"caption": {
|
|
100
|
+
"label": "Popisek obrázku",
|
|
101
|
+
"placeholder": "Zadejte popisek obrázku"
|
|
102
|
+
},
|
|
103
|
+
"source": {
|
|
104
|
+
"label": "Zdroj obrázku",
|
|
105
|
+
"placeholder": "Zadejte zdroj obrázku"
|
|
106
|
+
},
|
|
107
|
+
"file-upload": {
|
|
108
|
+
"label": "Obrázek"
|
|
109
|
+
},
|
|
110
|
+
"button-insert": "Vložit obrázek",
|
|
111
|
+
"button-edit": "Upravit obrázek"
|
|
112
|
+
},
|
|
113
|
+
"video": {
|
|
114
|
+
"tooltip": "Vložit video",
|
|
115
|
+
"url-address": {
|
|
116
|
+
"label": "URL adresa",
|
|
117
|
+
"placeholder": "Zadejte URL adresu",
|
|
118
|
+
"invalid": "Neplatná URL adresa."
|
|
119
|
+
},
|
|
120
|
+
"iframe-title": "Video",
|
|
121
|
+
"button-insert": "Vložit video",
|
|
122
|
+
"button-edit": "Upravit video"
|
|
123
|
+
},
|
|
124
|
+
"actions": {
|
|
125
|
+
"undo": {
|
|
126
|
+
"tooltip": "Vrátit zpět (Ctrl+Z)"
|
|
127
|
+
},
|
|
128
|
+
"redo": {
|
|
129
|
+
"tooltip": "Opakovat (Ctrl+Y)"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"uxf-wysiwyg": {
|
|
3
|
+
"common": {
|
|
4
|
+
"placeholder": "Schreiben Sie etwas Schönes..."
|
|
5
|
+
},
|
|
6
|
+
"components": {
|
|
7
|
+
"modal": {
|
|
8
|
+
"button-cancel": "Abbrechen"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"plugins": {
|
|
12
|
+
"formatting": {
|
|
13
|
+
"bold": {
|
|
14
|
+
"tooltip": "Fett (Ctrl+B)"
|
|
15
|
+
},
|
|
16
|
+
"italic": {
|
|
17
|
+
"tooltip": "Kursiv (Ctrl+I)"
|
|
18
|
+
},
|
|
19
|
+
"underline": {
|
|
20
|
+
"tooltip": "Unterstrichen (Ctrl+U)"
|
|
21
|
+
},
|
|
22
|
+
"code": {
|
|
23
|
+
"tooltip": "Code"
|
|
24
|
+
},
|
|
25
|
+
"highlight": {
|
|
26
|
+
"tooltip": "Hervorheben (Ctrl+Shift+H)"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"headings": {
|
|
30
|
+
"h1": {
|
|
31
|
+
"tooltip": "Überschrift H1"
|
|
32
|
+
},
|
|
33
|
+
"h2": {
|
|
34
|
+
"tooltip": "Überschrift H2"
|
|
35
|
+
},
|
|
36
|
+
"h3": {
|
|
37
|
+
"tooltip": "Überschrift H3"
|
|
38
|
+
},
|
|
39
|
+
"h4": {
|
|
40
|
+
"tooltip": "Überschrift H4"
|
|
41
|
+
},
|
|
42
|
+
"h5": {
|
|
43
|
+
"tooltip": "Überschrift H5"
|
|
44
|
+
},
|
|
45
|
+
"h6": {
|
|
46
|
+
"tooltip": "Überschrift H6"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"link": {
|
|
50
|
+
"url-address": {
|
|
51
|
+
"invalid": "Ungültige URL-Adresse",
|
|
52
|
+
"required": "URL-Adresse ist erforderlich",
|
|
53
|
+
"label": "URL-Adresse",
|
|
54
|
+
"placeholder": "URL-Adresse eingeben"
|
|
55
|
+
},
|
|
56
|
+
"link-text": {
|
|
57
|
+
"label": "Link-Text",
|
|
58
|
+
"placeholder": "Link-Text eingeben"
|
|
59
|
+
},
|
|
60
|
+
"open-in-new-tab": "In neuem Tab öffnen",
|
|
61
|
+
"tooltip": "Link einfügen",
|
|
62
|
+
"button-save": "Speichern",
|
|
63
|
+
"button-close": "Schließen"
|
|
64
|
+
},
|
|
65
|
+
"blocks": {
|
|
66
|
+
"quote": {
|
|
67
|
+
"tooltip": "Zitat"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"lists": {
|
|
71
|
+
"ul": {
|
|
72
|
+
"tooltip": "Aufzählung einfügen"
|
|
73
|
+
},
|
|
74
|
+
"ol": {
|
|
75
|
+
"tooltip": "Nummerierte Liste einfügen"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"button": {
|
|
79
|
+
"tooltip": "Schaltfläche einfügen",
|
|
80
|
+
"button-text": {
|
|
81
|
+
"label": "Schaltflächen-Text",
|
|
82
|
+
"placeholder": "Schaltflächen-Text eingeben",
|
|
83
|
+
"required": "Dieses Feld ist erforderlich"
|
|
84
|
+
},
|
|
85
|
+
"url-address": {
|
|
86
|
+
"label": "URL-Adresse",
|
|
87
|
+
"placeholder": "URL-Adresse eingeben",
|
|
88
|
+
"required": "Dieses Feld ist erforderlich"
|
|
89
|
+
},
|
|
90
|
+
"button-insert": "Schaltfläche einfügen",
|
|
91
|
+
"button-edit": "Schaltfläche bearbeiten"
|
|
92
|
+
},
|
|
93
|
+
"image": {
|
|
94
|
+
"tooltip": "Bild einfügen",
|
|
95
|
+
"alt": {
|
|
96
|
+
"label": "Alt-Text des Bildes",
|
|
97
|
+
"placeholder": "Alt-Text des Bildes eingeben"
|
|
98
|
+
},
|
|
99
|
+
"caption": {
|
|
100
|
+
"label": "Bildunterschrift",
|
|
101
|
+
"placeholder": "Bildunterschrift eingeben"
|
|
102
|
+
},
|
|
103
|
+
"source": {
|
|
104
|
+
"label": "Bildquelle",
|
|
105
|
+
"placeholder": "Bildquelle eingeben"
|
|
106
|
+
},
|
|
107
|
+
"file-upload": {
|
|
108
|
+
"label": "Bild"
|
|
109
|
+
},
|
|
110
|
+
"button-insert": "Bild einfügen",
|
|
111
|
+
"button-edit": "Bild bearbeiten"
|
|
112
|
+
},
|
|
113
|
+
"video": {
|
|
114
|
+
"tooltip": "Video einfügen",
|
|
115
|
+
"url-address": {
|
|
116
|
+
"label": "URL-Adresse",
|
|
117
|
+
"placeholder": "URL-Adresse eingeben",
|
|
118
|
+
"invalid": "Ungültige URL-Adresse."
|
|
119
|
+
},
|
|
120
|
+
"iframe-title": "Video",
|
|
121
|
+
"button-insert": "Video einfügen",
|
|
122
|
+
"button-edit": "Video bearbeiten"
|
|
123
|
+
},
|
|
124
|
+
"actions": {
|
|
125
|
+
"undo": {
|
|
126
|
+
"tooltip": "Rückgängig (Ctrl+Z)"
|
|
127
|
+
},
|
|
128
|
+
"redo": {
|
|
129
|
+
"tooltip": "Wiederholen (Ctrl+Y)"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|