fix: remove some magic strings

This commit is contained in:
Philipp Kühn
2021-12-02 14:56:57 +01:00
parent dedcf17d53
commit 6c34dec33a
25 changed files with 61 additions and 60 deletions

View File

@@ -80,13 +80,13 @@ export const Highlight = Mark.create<HighlightOptions>({
addCommands() {
return {
setHighlight: attributes => ({ commands }) => {
return commands.setMark('highlight', attributes)
return commands.setMark(this.name, attributes)
},
toggleHighlight: attributes => ({ commands }) => {
return commands.toggleMark('highlight', attributes)
return commands.toggleMark(this.name, attributes)
},
unsetHighlight: () => ({ commands }) => {
return commands.unsetMark('highlight')
return commands.unsetMark(this.name)
},
}
},