---
title: "Blok Inline Toolbar API — open and close"
description: "Show or hide the inline formatting toolbar from your own code, and react to selection changes."
source: https://blokeditor.com/docs/inline-toolbar-api/
lastmod: 2026-09-07
---

Framework JavaScript

Interface InlineToolbar

On this page inlineToolbar.close()

# Inline Toolbar API: control the formatting toolbar

Control the inline formatting toolbar (bold, italic, etc.).

[Edit this page on GitHub](https://github.com/JackUait/blok/blob/main/docs/src/components/api/api-data.ts)

### Reaching the editor instance

The methods below run on the editor you created with new Blok(). They are available once editor.isReady resolves.

TypeScript

```
// You already hold the instance returned by the constructor.
const editor = new Blok({ holder: 'editor' });
await editor.isReady;

// Call any API method on it.
editor.caret.setToLastBlock('end');
```

## Methods

### inlineToolbar.close()

void

Close the inline toolbar.

When to use

Dismiss the formatting popover — useful after a custom inline tool applies its change.

TypeScript

```
editor.inlineToolbar.close();
```

### inlineToolbar.open()

void

Open the inline toolbar at the current selection.

When to use

Show the formatting popover over the current selection; a no-op without selected text.

TypeScript

```
editor.inlineToolbar.open();
```
