---
title: "scrollIntoView command"
description: "Use the scrollIntoView command in Tiptap to scroll the view to the current selection or cursor position. Learn more in our docs!"
canonical_url: "https://tiptap.dev/docs/editor/api/commands/selection/scroll-into-view"
---

# scrollIntoView command

Use the scrollIntoView command in Tiptap to scroll the view to the current selection or cursor position. Learn more in our docs!

`scrollIntoView` scrolls the view to the current selection or cursor position.

## Use the scrollIntoView command

```js
editor.commands.scrollIntoView()
```
