---
title: "输入命令"
description: "在 Tiptap 中使用 enter 命令触发回车键操作，实现自动文本输入和格式设置。更多内容请参阅文档。"
canonical_url: "https://tiptap.zhcndoc.com/editor/api/commands/selection/enter"
---

# 输入命令

在 Tiptap 中使用 enter 命令触发回车键操作，实现自动文本输入和格式设置。更多内容请参阅文档。

`enter` 命令可以以编程方式触发回车键。

## 使用 enter 命令

```js
editor.commands.enter()
```
