# @milkdown-lab/plugin-fullscreen

> The plugin adds `fullscreen` feature to milkdown

Latest version **1.3.1** (published 2024-08-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @milkdown-lab/plugin-fullscreen
pnpm add @milkdown-lab/plugin-fullscreen
yarn add @milkdown-lab/plugin-fullscreen
bun add @milkdown-lab/plugin-fullscreen
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2024-08-07 |
| First published | 2023-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | enpitsulin |
| Maintainers | enpitsulin |
| Keywords | milkdown, milkdown-plugin |

## Links

- npm: https://www.npmjs.com/package/@milkdown-lab/plugin-fullscreen
- npm.io page: https://npm.io/package/@milkdown-lab/plugin-fullscreen

## Dependencies (5)

- [@milkdown/ctx](https://npm.io/package/@milkdown/ctx.md) ^7.4.0
- [@milkdown/core](https://npm.io/package/@milkdown/core.md) ^7.4.0
- [@milkdown/prose](https://npm.io/package/@milkdown/prose.md) ^7.4.0
- [@milkdown/utils](https://npm.io/package/@milkdown/utils.md) ^7.4.0
- [@milkdown/transformer](https://npm.io/package/@milkdown/transformer.md) ^7.4.0

## Recent versions

- 1.3.1 (latest) — 2024-08-07
- 1.3.0 — 2024-08-06
- 1.2.3 — 2024-05-15
- 1.2.2 — 2024-01-25
- 1.2.1 — 2023-11-06
- 1.2.0 — 2023-09-02
- 1.1.1 — 2023-07-05
- 1.1.0 — 2023-04-14
- 1.0.1 — 2023-03-08
- 1.0.0 — 2023-02-25
- 0.1.1 — 2023-01-17
- 0.1.0 — 2023-01-16
- 0.0.0 — 2023-01-16

## README

# @milkdown-lab/plugin-fullscreen

Plugin add `fullscreen` feature to milkdown editor.

## Usage

```sh
pnpm add @milkdown-lab/plugin-fullscreen
```

```javascript
import { fullscreen } from '@milkdown-lab/plugin-fullscreen'
// ...
const editor = await Editor.make()
  .config(() => {
    ctx.set(rootCtx, document.querySelector('#app'))
  })
  .use(fullscreen)
  .create()
```

Plugins add keyboard shortcuts, you can use `F11` to toggle fullscreen when editor was be focused.

## Options

### Styling

`@milkdown-lab/plugin-fullscreen` is now headless as same as `milkdown` v7, see [here](https://saul-mirone.github.io/a-brief-introduction-to-milkdown-v7/) for reason, so you need styling by yourself.

you should styling `.milkdown.fullscreen` selector by default option, for example:

```css
.milkdown.fullscreen {
  position: fixed;
  inset: 0;
  overflow-y: scroll;
}
```

### Adding custom attributes

You can also add attributes to fullscreen element if you want if you want to build your own style logic or using atom css library like tailwindcss.

```javascript
import { fullscreen } from '@milkdown-lab/plugin-fullscreen'
// ...
const editor = await Editor.make()
  .config(() => {
    ctx.set(fullscreenOptionsCtx.key, { attributes: { class: 'fixed inset-0 overflow-y-scroll' } })
    ctx.set(rootCtx, document.querySelector('#app'))
  })
  .use(fullscreen)
  .create()
```

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