@uxf/wysiwyg 11.130.0 → 11.130.1
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
CHANGED
|
@@ -24,9 +24,11 @@ describe("blockquote", () => {
|
|
|
24
24
|
expect(e.children[0].children).toEqual([{ text: "citace" }]);
|
|
25
25
|
});
|
|
26
26
|
// @udecode/plate-block-quote@20.7.2 defaulted to mod+shift+. ; Plate 53 ships no quote shortcut.
|
|
27
|
-
|
|
27
|
+
// Spelled "period", not ".": the matcher compares event.key, and the physical period key with
|
|
28
|
+
// shift held reports ">", so "mod+shift+." never fires. Covered in the browser by hotkeys.e2e.ts.
|
|
29
|
+
it("keeps the mod+shift+period hotkey", () => {
|
|
28
30
|
var _a;
|
|
29
|
-
expect((_a = editor([]).plugins.blockquote.shortcuts.toggle) === null || _a === void 0 ? void 0 : _a.keys).toBe("mod+shift
|
|
31
|
+
expect((_a = editor([]).plugins.blockquote.shortcuts.toggle) === null || _a === void 0 ? void 0 : _a.keys).toBe("mod+shift+period");
|
|
30
32
|
});
|
|
31
33
|
// Plate 20 inserted a literal "\n" and never let Enter out of a quote. Deliberately changed.
|
|
32
34
|
it("splits the quote on Enter", () => {
|
|
@@ -9,6 +9,17 @@ const createHighlightPlugin = (color = "yellow") => (0, react_1.createPlatePlugi
|
|
|
9
9
|
node: { isLeaf: true },
|
|
10
10
|
options: { color },
|
|
11
11
|
parsers: { html: { deserializer: { rules: [{ validNodeName: ["MARK"] }] } } },
|
|
12
|
-
|
|
12
|
+
// The handler is not optional: a bare `keys` shortcut resolves through the plugin's own
|
|
13
|
+
// toggle transform, which Plate's marks get from `toPlatePlugin` and a hand-written plugin
|
|
14
|
+
// does not have. Without it the hotkey silently does nothing.
|
|
15
|
+
shortcuts: {
|
|
16
|
+
toggle: {
|
|
17
|
+
handler: ({ editor }) => {
|
|
18
|
+
editor.tf.toggleMark(types_1.HIGHLIGHT_PLUGIN_KEY);
|
|
19
|
+
return true;
|
|
20
|
+
},
|
|
21
|
+
keys: "mod+shift+h",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
13
24
|
});
|
|
14
25
|
exports.createHighlightPlugin = createHighlightPlugin;
|