diff --git a/.changeset/forty-emus-repeat.md b/.changeset/forty-emus-repeat.md new file mode 100644 index 0000000000..243105c9ba --- /dev/null +++ b/.changeset/forty-emus-repeat.md @@ -0,0 +1,5 @@ +--- +'@udecode/plate-basic-marks': patch +--- + +Fix editor shortcuts for subscript and superscript marks. diff --git a/packages/basic-marks/src/react/SubscriptPlugin.tsx b/packages/basic-marks/src/react/SubscriptPlugin.tsx index e4554ae8ca..ef696eb25a 100644 --- a/packages/basic-marks/src/react/SubscriptPlugin.tsx +++ b/packages/basic-marks/src/react/SubscriptPlugin.tsx @@ -8,7 +8,7 @@ export const SubscriptPlugin = toPlatePlugin( ({ editor, type }) => ({ shortcuts: { toggleSubscript: { - keys: [[Key.Mod, ',']], + keys: [[Key.Mod, 'comma']], preventDefault: true, handler: () => { editor.tf.toggleMark(type, { diff --git a/packages/basic-marks/src/react/SuperscriptPlugin.tsx b/packages/basic-marks/src/react/SuperscriptPlugin.tsx index 485a7e22b5..c56cd68e02 100644 --- a/packages/basic-marks/src/react/SuperscriptPlugin.tsx +++ b/packages/basic-marks/src/react/SuperscriptPlugin.tsx @@ -8,7 +8,7 @@ export const SuperscriptPlugin = toPlatePlugin( ({ editor, type }) => ({ shortcuts: { toggleSuperscript: { - keys: [[Key.Mod, '.']], + keys: [[Key.Mod, 'period']], preventDefault: true, handler: () => { editor.tf.toggleMark(type, {