2021-04-21 17:03:33 +08:00
|
|
|
# resetAttributes
|
2022-06-08 18:15:59 +08:00
|
|
|
`resetAttributes` resets some of the nodes attributes back to it's default attributes.
|
2021-04-21 17:03:33 +08:00
|
|
|
|
2022-06-08 18:15:59 +08:00
|
|
|
## Parameters
|
|
|
|
`typeOrName: string | Node`
|
|
|
|
|
|
|
|
The node that should be resetted. Can be a string or a Node.
|
|
|
|
|
|
|
|
`attributes: string | string[]`
|
|
|
|
|
|
|
|
A string or an array of strings that defines which attributes should be reset.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
|
|
// reset the style and class attributes on the currently selected paragraph nodes
|
|
|
|
editor.commands.resetAttributes('paragraph', ['style', 'class'])
|
|
|
|
```
|