# slate-edit-blockquote

> A Slate plugin to handle keyboard events in blockquotes.

Latest version **0.6.1** (published 2018-04-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install slate-edit-blockquote
pnpm add slate-edit-blockquote
yarn add slate-edit-blockquote
bun add slate-edit-blockquote
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2018-04-19 |
| First published | 2016-09-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 27.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Maintainers | aarono, gitbook-bot, jpreynat, samypesse, soreine, zhouzi |
| Keywords | slate |

## Links

- npm: https://www.npmjs.com/package/slate-edit-blockquote
- Repository: https://github.com/GitbookIO/slate-edit-blockquote
- Homepage: https://github.com/GitbookIO/slate-edit-blockquote#readme
- Issues: https://github.com/GitbookIO/slate-edit-blockquote/issues
- npm.io page: https://npm.io/package/slate-edit-blockquote

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 0.6.1 (latest) — 2018-04-19
- 0.6.0 — 2018-03-22
- 0.5.0 — 2017-11-08
- 0.4.0 — 2017-09-19
- 0.2.0 — 2016-11-30
- 0.1.3 — 2016-11-03
- 0.1.2 — 2016-09-30
- 0.1.1 — 2016-09-19
- 0.1.0 — 2016-09-17

## README

# slate-edit-blockquote

[![NPM version](https://badge.fury.io/js/slate-edit-blockquote.svg)](http://badge.fury.io/js/slate-edit-blockquote)
[![Linux Build Status](https://travis-ci.org/GitbookIO/slate-edit-blockquote.png?branch=master)](https://travis-ci.org/GitbookIO/slate-edit-blockquote)

A Slate plugin to handle keyboard events in blockquotes. Blockquotes can contain blocks.

### Install

```
npm install slate-edit-blockquote
```

### Features

Natural keybindings:

- Pressing <kbd>Enter</kbd> in an empty block of a blockquote, exits the blockquote
- Pressing <kbd>Backspace</kbd> at the start of a block in a blockquote, unwraps from the blockquote

### Simple Usage

```js
import EditBlockquote from 'slate-edit-blockquote'

const plugins = [
  EditBlockquote()
]
```

#### Arguments

This plugin accepts options to redefine the following block types:

- ``[type: String]`` — type for blockquotes
- ``[typeDefault: String]`` — type for default block in blockquote.

### Utilities

`slate-edit-blockquote` exports utilities and changes:

#### `utils.isSelectionInBlockquote`

`plugin.utils.isSelectionInBlockquote(value: Value) => Boolean`

Return true if selection is inside a blockquote (and it can be unwrap).

#### `changes.wrapInBlockquote`

`plugin.changes.wrapInBlockquote(change: Change) => Change`

Wrap current block in a new blockquote.

#### `changes.unwrapBlockquote`

`plugin.changes.unwrapBlockquote(change: Change) => Change`

Unwrap from current blockquote if any.

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