From 4c4a0dc98e5c7351d6a0d2e8b16661c1e8f54fdd Mon Sep 17 00:00:00 2001 From: Ricardo Amaral Date: Wed, 17 Jan 2024 20:12:05 +0000 Subject: [PATCH] fix(commands): Restore built-in `toggleBulletList` and `toggleOrderedList` (#613) --- src/extensions/rich-text/rich-text-bullet-list.ts | 1 + src/extensions/rich-text/rich-text-ordered-list.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/extensions/rich-text/rich-text-bullet-list.ts b/src/extensions/rich-text/rich-text-bullet-list.ts index 67ec3e85..d6833139 100644 --- a/src/extensions/rich-text/rich-text-bullet-list.ts +++ b/src/extensions/rich-text/rich-text-bullet-list.ts @@ -33,6 +33,7 @@ const RichTextBulletList = BulletList.extend({ const { editor, name, options } = this return { + ...this.parent?.(), smartToggleBulletList() { return ({ commands, state, tr, chain }) => { const { schema } = state diff --git a/src/extensions/rich-text/rich-text-ordered-list.ts b/src/extensions/rich-text/rich-text-ordered-list.ts index 368f853a..47e12ccc 100644 --- a/src/extensions/rich-text/rich-text-ordered-list.ts +++ b/src/extensions/rich-text/rich-text-ordered-list.ts @@ -33,6 +33,7 @@ const RichTextOrderedList = OrderedList.extend({ const { editor, name, options } = this return { + ...this.parent?.(), smartToggleOrderedList() { return ({ commands, state, tr, chain }) => { const { schema } = state