rename removeMark to unsetMark

This commit is contained in:
Philipp Kühn
2020-11-18 17:38:16 +01:00
parent c0a0c7a204
commit 2c5885c026
10 changed files with 11 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ import getMarkRange from '../utils/getMarkRange'
/**
* Remove all marks in the current selection.
*/
export const removeMark = (typeOrName: string | MarkType): Command => ({ tr, state, dispatch }) => {
export const unsetMark = (typeOrName: string | MarkType): Command => ({ tr, state, dispatch }) => {
const { selection } = tr
const type = getMarkType(typeOrName, state.schema)
let { from, to } = selection

View File

@@ -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 removeMark from '../commands/removeMark'
import * as removeMarks from '../commands/removeMarks'
import * as resetNodeAttributes from '../commands/resetNodeAttributes'
import * as scrollIntoView from '../commands/scrollIntoView'
@@ -27,6 +26,7 @@ import * as toggleBlockType from '../commands/toggleBlockType'
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 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,
...removeMark,
...removeMarks,
...resetNodeAttributes,
...scrollIntoView,
@@ -62,6 +61,7 @@ export const Commands = Extension.create({
...toggleList,
...toggleMark,
...toggleWrap,
...unsetMark,
...updateNodeAttributes,
...wrapIn,
...wrapInList,