# Tachado {#strikethrough}

Source: [Formate texto riscado no editor React · Yurich](https://leeyujoo.com/yurich/pt-br/features/strikethrough/)

Package: [`yurich`](https://www.npmjs.com/package/yurich)

Package version: `0.1.2`

Risque um trecho sem apagar o texto.

## Experimente {#try-it}

Selecione “Yurich” e clique em **Tachado**. O HTML inclui `<s>Yurich</s>` e o texto permanece.

## Adicione ao seu editor {#setup}

Ative `Strikethrough` e conecte `toggleStrikethrough`.

```tsx
import { EditorContent, EditorProvider, Strikethrough, useEditor, useIsActive } from 'yurich';

export function StrikethroughEditor() {
  const editor = useEditor({
    extensions: [Strikethrough],
    initialValue: "<p>Risque Yurich e veja o que sobra.</p>",
  });
  const active = useIsActive(editor, 'toggleStrikethrough');

  return (
    <EditorProvider editor={editor}>
      <button
        type="button"
        aria-pressed={active}
        onMouseDown={event => event.preventDefault()}
        onClick={() => editor.execute('toggleStrikethrough')}
      >
        Tachado
      </button>
      <EditorContent ariaLabel="Editor" />
    </EditorProvider>
  );
}
```

## Como o recurso se comporta {#behavior}

O atalho é `Mod+Shift+S`. Na entrada, `<del>` é normalizado para `<s>`.

[Recursos](https://leeyujoo.com/yurich/pt-br/features/)
