diff --git a/docs/src/demos/Examples/Basic/index.vue b/docs/src/demos/Examples/Basic/index.vue index b01c20a7..75de6f55 100644 --- a/docs/src/demos/Examples/Basic/index.vue +++ b/docs/src/demos/Examples/Basic/index.vue @@ -13,7 +13,7 @@ code - + clear marks diff --git a/docs/src/demos/Examples/CollaborativeEditing/index.vue b/docs/src/demos/Examples/CollaborativeEditing/index.vue index 980e1547..493bbca7 100644 --- a/docs/src/demos/Examples/CollaborativeEditing/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditing/index.vue @@ -13,7 +13,7 @@ code - + clear marks diff --git a/docs/src/demos/Examples/CollaborativeEditingWs/index.vue b/docs/src/demos/Examples/CollaborativeEditingWs/index.vue index 34726ad5..c876fad7 100644 --- a/docs/src/demos/Examples/CollaborativeEditingWs/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditingWs/index.vue @@ -13,7 +13,7 @@ code - + clear marks diff --git a/docs/src/demos/Guide/BuildYourEditor/index.vue b/docs/src/demos/Guide/BuildYourEditor/index.vue index c48bf7d2..75baf3b5 100644 --- a/docs/src/demos/Guide/BuildYourEditor/index.vue +++ b/docs/src/demos/Guide/BuildYourEditor/index.vue @@ -1,7 +1,7 @@ - + clear formatting diff --git a/docs/src/demos/React/index.jsx b/docs/src/demos/React/index.jsx index b2a0e06d..c8a4fd02 100644 --- a/docs/src/demos/React/index.jsx +++ b/docs/src/demos/React/index.jsx @@ -9,7 +9,7 @@ const MenuBar = () => { return ( <> - editor.chain().focus().unsetMarks().run()}> + editor.chain().focus().unsetAllMarks().run()}> Clear formatting ({ tr, state, dispatch }) => { +export const unsetAllMarks = (): Command => ({ tr, state, dispatch }) => { const { selection } = tr const { from, to, empty } = selection diff --git a/packages/core/src/extensions/commands.ts b/packages/core/src/extensions/commands.ts index c99c2ff3..2f374c91 100644 --- a/packages/core/src/extensions/commands.ts +++ b/packages/core/src/extensions/commands.ts @@ -25,8 +25,8 @@ import * as toggleList from '../commands/toggleList' import * as toggleMark from '../commands/toggleMark' import * as toggleNode from '../commands/toggleNode' import * as toggleWrap from '../commands/toggleWrap' +import * as unsetAllMarks from '../commands/unsetAllMarks' import * as unsetMark from '../commands/unsetMark' -import * as unsetMarks from '../commands/unsetMarks' import * as updateNodeAttributes from '../commands/updateNodeAttributes' import * as wrapIn from '../commands/wrapIn' import * as wrapInList from '../commands/wrapInList' @@ -61,7 +61,7 @@ export const Commands = Extension.create({ ...toggleNode, ...toggleWrap, ...unsetMark, - ...unsetMarks, + ...unsetAllMarks, ...updateNodeAttributes, ...wrapIn, ...wrapInList,