mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-20 14:47:50 +08:00
18 lines
490 B
Markdown
18 lines
490 B
Markdown
# resetAttributes
|
|
`resetAttributes` resets some of the nodes attributes back to it's default attributes.
|
|
|
|
## 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'])
|
|
```
|