Socket
Socket
Sign inDemoInstall

@wikifactory/slate-edit-blockquote

Package Overview
Dependencies
13
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @wikifactory/slate-edit-blockquote

A Slate plugin to handle keyboard events in blockquotes.


Version published
Weekly downloads
882
decreased by-21.46%
Maintainers
2
Install size
29.2 kB
Created
Weekly downloads
 

Changelog

Source

[0.7.1] - 2018-12-20

  • Upgrade slate to 0.44.x

Readme

Source

@wikifactory/slate-edit-blockquote

NPM version Linux Build Status

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

Install

npm install @wikifactory/slate-edit-blockquote

Features

Natural keybindings:

  • Pressing Enter in an empty block of a blockquote, exits the blockquote
  • Pressing Backspace at the start of a block in a blockquote, unwraps from the blockquote

Simple Usage

import EditBlockquote from '@wikifactory/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

@wikifactory/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(editor: Editor) => Editor

Wrap current block in a new blockquote.

changes.unwrapBlockquote

plugin.changes.unwrapBlockquote(editor: Editor) => Editor

Unwrap from current blockquote if any.

Keywords

FAQs

Last updated on 20 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc