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

@@ -57,13 +57,13 @@ export const Code = Mark.create<CodeOptions>({
addCommands() {
return {
setCode: () => ({ commands }) => {
return commands.setMark('code')
return commands.setMark(this.name)
},
toggleCode: () => ({ commands }) => {
return commands.toggleMark('code')
return commands.toggleMark(this.name)
},
unsetCode: () => ({ commands }) => {
return commands.unsetMark('code')
return commands.unsetMark(this.name)
},
}
},