Skip to content
ФреймворкJavaScript

Подчёркивание: подчёркнутый текст

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

Импорт

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

Формат данных

TypeScript
// Stored as HTML inside the block's text field.
// "Hello <u>world</u>"
JSON
{
  "type": "paragraph",
  "data": { "text": "Hello <u>world</u>" }
}

Пример использования

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

const editor = new Blok({
  holder: 'editor',
  tools: {
    underline: Underline,
  },
});