# @markmirror/menubar

> Menubar actions for the MarkMirror Markdown editor

Latest version **0.3.0** (published 2023-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @markmirror/menubar
pnpm add @markmirror/menubar
yarn add @markmirror/menubar
bun add @markmirror/menubar
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2023-03-11 |
| First published | 2022-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hsiaoming Yang |
| Maintainers | lepture |
| Keywords | markdown, editor |

## Links

- npm: https://www.npmjs.com/package/@markmirror/menubar
- Repository: https://github.com/markmirror/menubar
- Homepage: https://github.com/markmirror/menubar#readme
- Issues: https://github.com/markmirror/menubar/issues
- npm.io page: https://npm.io/package/@markmirror/menubar

## Dependencies (2)

- [@markmirror/core](https://npm.io/package/@markmirror/core.md) ^0.3.0
- [@markmirror/commands](https://npm.io/package/@markmirror/commands.md) ^0.3.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.3.0 (latest) — 2023-03-11
- 0.2.1 — 2022-06-09
- 0.2.0 — 2022-06-08
- 0.1.0 — 2022-06-06

## README

# @markmirror/menubar

Menubar actions for the MarkMirror Markdown editor.

## Usage

```js
import { MarkMirror } from "@markmirror/core"
import { Menubar } from "@markmirror/menubar"

const editor = new MarkMirror()

// Menubar requires `editor` as parameter
// MUST init before `editor.render`
const menubar = new Menubar(editor, ["bold", "italic", "codespan", "|", "ul", "ol", "|", "h1", "h2"])

// mount `menubar.element`
document.getElementById('menubar')!.appendChild(menubar.element)
```

## Actions

- undo
- redo
- bold
- italic
- codespan
- link
- image
- strikethrough
- codeblock
- blockquote
- hr
- ul
- ol
- h1
- h2
- h3
- h4
- h5
- h6

When `undo` or `redo` is included, `MarkMirror` requires a history extension:

```js
import { MarkMirror } from "@markmirror/core"
import { history } from "@codemirror/commands"

const editor = new MarkMirror({ extensions: [ history() ]})
```

---
_Source: https://npm.io/package/@markmirror/menubar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
