# applyMarkdownCommand (@salmonui/editors/markdown-editor)

> The applyMarkdownCommand function of @salmonui/editors/markdown-editor: Runs a text command; returns the new state.

Canonical: https://salmonui.dev/docs/reference/editors/markdown-editor/applyMarkdownCommand

```ts
import { applyMarkdownCommand } from '@salmonui/editors/markdown-editor';
```

Entry index: https://salmonui.dev/docs/reference/editors/markdown-editor (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/editors/markdown-editor.md).

## Reference

Kind: function

```ts
function applyCommand(id: MarkdownTextCommand, state: TextState, syntax?: MarkdownSyntax, locale?: string | readonly string[]): TextState;
```

Runs a text command; returns the new state.
