---
title: "提升命令"
description: "在您的 Tiptap 编辑器中使用提升命令将节点提升到其父节点。更多信息请参阅我们的文档！"
canonical_url: "https://tiptap.zhcndoc.com/editor/api/commands/nodes-and-marks/lift"
---

# 提升命令

在您的 Tiptap 编辑器中使用提升命令将节点提升到其父节点。更多信息请参阅我们的文档！

`lift` 命令将给定节点提升到其父节点。**提升**意味着该块将被移动到它当前所在块的父级。

## 参数

`typeOrName: String | NodeType`

应该被提升的节点。如果在当前选择中找不到该节点，则忽略该命令。

`attributes: Record<string, any>`

节点应该具备的属性，以便被提升。此项**可选**。

## 使用提升命令

```js
// 提升任何标题
editor.commands.lift('headline')

// 仅提升 h2
editor.commands.lift('headline', { level: 2 })
```
