> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/ueberdosis/tiptap/llms.txt
> Use this file to discover all available pages before exploring further.

# Bold

> Mark text as bold to emphasize important content.

The Bold extension allows you to mark text as bold. Text is rendered as a `<strong>` HTML element by default.

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @tiptap/extension-bold
  ```

  ```bash yarn theme={null}
  yarn add @tiptap/extension-bold
  ```

  ```bash pnpm theme={null}
  pnpm add @tiptap/extension-bold
  ```
</CodeGroup>

## Usage

```typescript theme={null}
import { Editor } from '@tiptap/core'
import Bold from '@tiptap/extension-bold'

const editor = new Editor({
  extensions: [
    Bold,
  ],
})
```

## Keyboard Shortcuts

* `Mod-b` or `Mod-B` - Toggle bold formatting

## Markdown Support

The extension supports markdown syntax for bold text:

* Type `**text**` to create bold text
* Type `__text__` to create bold text

## Configuration Options

<ParamField path="HTMLAttributes" type="Record<string, any>" default="{}">
  HTML attributes to add to the bold element.

  ```typescript theme={null}
  Bold.configure({
    HTMLAttributes: {
      class: 'my-bold-class',
    },
  })
  ```
</ParamField>

## Commands

### setBold()

Set a bold mark on the current selection.

```typescript theme={null}
editor.commands.setBold()
```

### toggleBold()

Toggle the bold mark on the current selection.

```typescript theme={null}
editor.commands.toggleBold()
```

### unsetBold()

Remove the bold mark from the current selection.

```typescript theme={null}
editor.commands.unsetBold()
```

## Source Code

View the source code on GitHub:

* [packages/extension-bold](https://github.com/ueberdosis/tiptap/tree/main/packages/extension-bold)
