> ## 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.

# Strike

> Mark text with strikethrough formatting.

The Strike extension allows you to mark text with strikethrough formatting. Text is rendered as an `<s>` HTML element by default.

## Installation

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

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

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

## Usage

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

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

## Keyboard Shortcuts

* `Mod-Shift-s` - Toggle strikethrough formatting

## Markdown Support

The extension supports markdown syntax for strikethrough text:

* Type `~~text~~` to create strikethrough text

## Configuration Options

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

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

## Commands

### setStrike()

Set a strike mark on the current selection.

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

### toggleStrike()

Toggle the strike mark on the current selection.

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

### unsetStrike()

Remove the strike mark from the current selection.

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

## Source Code

View the source code on GitHub:

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