diff --git a/docs/src/demos/Examples/Basic/index.vue b/docs/src/demos/Examples/Basic/index.vue index 492d1e3a..b01c20a7 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 d1a6b695..980e1547 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 7c721e7e..34726ad5 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 0d382c14..c48bf7d2 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 47f4c50b..b2a0e06d 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().removeMarks().run()}> + editor.chain().focus().unsetMarks().run()}> Clear formatting ({ tr, state, dispatch }) => { +export const unsetMarks = (): 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 92db9dff..38030a1b 100644 --- a/packages/core/src/extensions/commands.ts +++ b/packages/core/src/extensions/commands.ts @@ -11,7 +11,6 @@ import * as insertHTML from '../commands/insertHTML' import * as insertText from '../commands/insertText' import * as lift from '../commands/lift' import * as liftListItem from '../commands/liftListItem' -import * as removeMarks from '../commands/removeMarks' import * as resetNodeAttributes from '../commands/resetNodeAttributes' import * as scrollIntoView from '../commands/scrollIntoView' import * as selectAll from '../commands/selectAll' @@ -27,6 +26,7 @@ import * as toggleList from '../commands/toggleList' import * as toggleMark from '../commands/toggleMark' import * as toggleWrap from '../commands/toggleWrap' 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' @@ -46,7 +46,6 @@ export const Commands = Extension.create({ ...insertText, ...lift, ...liftListItem, - ...removeMarks, ...resetNodeAttributes, ...scrollIntoView, ...selectAll, @@ -62,6 +61,7 @@ export const Commands = Extension.create({ ...toggleMark, ...toggleWrap, ...unsetMark, + ...unsetMarks, ...updateNodeAttributes, ...wrapIn, ...wrapInList,