From 76df7123cd2e96ff2b663feeb7dea882f0fb44ad Mon Sep 17 00:00:00 2001 From: Leonidas <77194479+LeonMueller-OneAndOnly@users.noreply.github.com> Date: Fri, 31 May 2024 19:38:20 +0200 Subject: [PATCH 1/3] fix: subscript and superscript were mixed up --- .../src/registry/default/plate-ui/more-dropdown-menu.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/www/src/registry/default/plate-ui/more-dropdown-menu.tsx b/apps/www/src/registry/default/plate-ui/more-dropdown-menu.tsx index 1aef721eb3..5ba17f70f5 100644 --- a/apps/www/src/registry/default/plate-ui/more-dropdown-menu.tsx +++ b/apps/www/src/registry/default/plate-ui/more-dropdown-menu.tsx @@ -35,8 +35,8 @@ export function MoreDropdownMenu(props: DropdownMenuProps) { { toggleMark(editor, { - clear: MARK_SUPERSCRIPT, - key: MARK_SUBSCRIPT, + key: MARK_SUPERSCRIPT, + clear: [MARK_SUPERSCRIPT, MARK_SUBSCRIPT], }); focusEditor(editor); }} @@ -49,7 +49,7 @@ export function MoreDropdownMenu(props: DropdownMenuProps) { onSelect={() => { toggleMark(editor, { clear: MARK_SUBSCRIPT, - key: MARK_SUPERSCRIPT, + clear: [MARK_SUPERSCRIPT, MARK_SUBSCRIPT], }); focusEditor(editor); }} From 2ec99caf0c1d628e06f63242db357e890f66042c Mon Sep 17 00:00:00 2001 From: Leonidas <77194479+LeonMueller-OneAndOnly@users.noreply.github.com> Date: Fri, 31 May 2024 19:47:04 +0200 Subject: [PATCH 2/3] fix: reapply same fix as previous --- .../src/components/plate-ui/more-dropdown-menu.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/plate-playground-template/src/components/plate-ui/more-dropdown-menu.tsx b/templates/plate-playground-template/src/components/plate-ui/more-dropdown-menu.tsx index 78729ac458..7c11c11ecc 100644 --- a/templates/plate-playground-template/src/components/plate-ui/more-dropdown-menu.tsx +++ b/templates/plate-playground-template/src/components/plate-ui/more-dropdown-menu.tsx @@ -33,8 +33,8 @@ export function MoreDropdownMenu(props: DropdownMenuProps) { { toggleMark(editor, { - key: MARK_SUBSCRIPT, - clear: MARK_SUPERSCRIPT, + key: MARK_SUPERSCRIPT, + clear: [MARK_SUPERSCRIPT, MARK_SUBSCRIPT], }); focusEditor(editor); }} @@ -46,8 +46,8 @@ export function MoreDropdownMenu(props: DropdownMenuProps) { { toggleMark(editor, { - key: MARK_SUPERSCRIPT, clear: MARK_SUBSCRIPT, + clear: [MARK_SUPERSCRIPT, MARK_SUBSCRIPT], }); focusEditor(editor); }} From 06bb33ecc63bac9ff5bd00d516c154fd49a79f02 Mon Sep 17 00:00:00 2001 From: Leonidas <77194479+LeonMueller-OneAndOnly@users.noreply.github.com> Date: Fri, 31 May 2024 19:49:15 +0200 Subject: [PATCH 3/3] fix: reapply same changes third and last occurence in codebase --- .../components/plate-ui/playground-more-dropdown-menu.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/www/src/components/plate-ui/playground-more-dropdown-menu.tsx b/apps/www/src/components/plate-ui/playground-more-dropdown-menu.tsx index ece1669f6a..91d2db85cb 100644 --- a/apps/www/src/components/plate-ui/playground-more-dropdown-menu.tsx +++ b/apps/www/src/components/plate-ui/playground-more-dropdown-menu.tsx @@ -67,8 +67,8 @@ export function PlaygroundMoreDropdownMenu(props: DropdownMenuProps) { { toggleMark(editor, { - clear: MARK_SUBSCRIPT, - key: MARK_SUPERSCRIPT, + clear: MARK_SUPERSCRIPT, + key: MARK_SUBSCRIPT, }); focusEditor(editor); }} @@ -80,8 +80,8 @@ export function PlaygroundMoreDropdownMenu(props: DropdownMenuProps) { { toggleMark(editor, { - clear: MARK_SUPERSCRIPT, - key: MARK_SUBSCRIPT, + clear: MARK_SUBSCRIPT, + key: MARK_SUPERSCRIPT, }); focusEditor(editor); }}