rename removeMarks to unsetMarks

This commit is contained in:
Philipp Kühn
2020-11-18 17:43:59 +01:00
parent 2c5885c026
commit d075d5c425
8 changed files with 11 additions and 12 deletions

View File

@@ -13,7 +13,7 @@
<button @click="editor.chain().focus().toggleCode().run()" :class="{ 'is-active': editor.isActive('code') }">
code
</button>
<button @click="editor.chain().focus().removeMarks().run()">
<button @click="editor.chain().focus().unsetMarks().run()">
clear marks
</button>
<button @click="editor.chain().focus().clearNodes().run()">

View File

@@ -13,7 +13,7 @@
<button @click="editor.chain().focus().toggleCode().run()" :class="{ 'is-active': editor.isActive('code') }">
code
</button>
<button @click="editor.chain().focus().removeMarks().run()">
<button @click="editor.chain().focus().unsetMarks().run()">
clear marks
</button>
<button @click="editor.chain().focus().clearNodes().run()">

View File

@@ -13,7 +13,7 @@
<button @click="editor.chain().focus().toggleCode().run()" :class="{ 'is-active': editor.isActive('code') }">
code
</button>
<button @click="editor.chain().focus().removeMarks().run()">
<button @click="editor.chain().focus().unsetMarks().run()">
clear marks
</button>
<button @click="editor.chain().focus().clearNodes().run()">

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div v-if="editor">
<button @click="editor.chain().focus().removeMarks().run()">
<button @click="editor.chain().focus().unsetMarks().run()">
clear formatting
</button>
<button @click="editor.chain().focus().undo().run()">

View File

@@ -9,7 +9,7 @@ const MenuBar = () => {
return (
<>
<button onClick={() => editor.chain().focus().removeMarks().run()}>
<button onClick={() => editor.chain().focus().unsetMarks().run()}>
Clear formatting
</button>
<button

View File

@@ -106,19 +106,18 @@ Have a look at all of the core commands listed below. They should give you a goo
### Nodes & Marks
| Command | Description |
| ----------------------- | --------------------------------------------------------- |
| .addMark() | Add a mark with new attributes. |
| .clearNodes() | Normalize nodes to a simple paragraph. |
| .extendMarkRange() | Extends the text selection to the current mark. |
| .removeMark() | Remove a mark in the current selection. |
| .removeMarks() | Remove all marks in the current selection. |
| .removeMarks() | Remove all marks in the current selection. |
| .resetNodeAttributes() | Resets all node attributes to the default value. |
| .selectParentNode() | Select the parent node. |
| .setBlockType() | Replace a given range with a node. |
| .setMark() | Add a mark with new attributes. |
| .splitBlock() | Forks a new node from an existing node. |
| .toggleBlockType() | Toggle a node with another node. |
| .toggleMark() | Toggle a mark on and off. |
| .toggleWrap() | Wraps nodes in another node, or removes an existing wrap. |
| .unsetMark() | Remove a mark in the current selection. |
| .unsetMarks() | Remove all marks in the current selection. |
| .updateNodeAttributes() | Update attributes of a node. |
### Lists