---
title: "Underline Inline Tool — Cmd+U in Blok"
description: "Underline a selection from the inline toolbar or with Cmd/Ctrl+U, and the markup it stores in block text."
source: https://blokeditor.com/docs/underline/
lastmod: 2026-10-07
---

Framework JavaScript

Inline Tools Underline

# Underline: underlined text in Blok

Wraps selected text in `<u>`. Activated with Cmd/Ctrl+U or by clicking the U button in the inline toolbar.

### Import

TypeScript

```
import { Underline } from '@bloklabs/core/tools';
```

### Save Data

TypeScript

```
// A mark on a run of the block's text field:
// { "text": "world", "marks": { "underline": true } }
```

JSON

```
{
  "type": "paragraph",
  "data": {
    "text": [{ "text": "Hello " }, { "text": "world", "marks": { "underline": true } }]
  }
}
```

### Usage Example

TypeScript

```
import { Blok } from '@bloklabs/core';
import { Underline, Paragraph } from '@bloklabs/core/tools';

const editor = new Blok({
  holder: 'editor',
  tools: {
    // Paragraph is the default block and is not bundled with the core —
    // without it the editor starts with an "unsupported block" stub.
    paragraph: Paragraph,
    underline: Underline,
  },
});
```
