resetAttributes 将某些节点的属性重置为其默认属性。
resetAttributes
typeOrName: string | Node
应被重置的节点。可以是字符串或 Node。
attributes: string | string[]
一个字符串或字符串数组,定义要重置哪些属性。
// 重置当前选中的段落节点上的样式和类属性 editor.commands.resetAttributes('paragraph', ['style', 'class'])