---
title: "resetAttributes 命令"
description: "在 Tiptap 中使用 resetAttributes 命令将节点的属性重置为默认值。阅读我们的文档以了解更多信息！"
canonical_url: "https://tiptap.zhcndoc.com/editor/api/commands/nodes-and-marks/reset-attributes"
---

# resetAttributes 命令

在 Tiptap 中使用 resetAttributes 命令将节点的属性重置为默认值。阅读我们的文档以了解更多信息！

`resetAttributes` 将某些节点的属性重置为其默认属性。

## 参数

`typeOrName: string | Node`

应被重置的节点。可以是字符串或 Node。

`attributes: string | string[]`

一个字符串或字符串数组，定义要重置哪些属性。

## 使用 resetAttributes 命令

```js
// 重置当前选中的段落节点上的样式和类属性
editor.commands.resetAttributes('paragraph', ['style', 'class'])
```
