Socket
Socket
Sign inDemoInstall

@slate-editor/bold-plugin

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slate-editor/bold-plugin

SlateJS bold mark plugin.


Version published
Weekly downloads
1.2K
increased by15.62%
Maintainers
2
Weekly downloads
 
Created
Source
Nossas logo
Nossas Cidades logo

@slate-editor/bold-plugin

SlateJS bold plugin.

npm package npm downloads

Installation

The @slate-editor/bold-plugin is available as an npm package.

yarn add @slate-editor/bold-plugin

Usage

Here is a quick example to get you started:

import React from 'react'
import { SlateEditor, SlateToolbar, SlateContent } from 'slate-editor'
import { BoldPlugin, BoldButtonBar } from '@slate-editor/bold-plugin'

const plugins = [
  BoldPlugin()
]

const SlateRichTextEditor = () => (
  <SlateEditor plugins={plugins}>
    <SlateToolbar>
      <BoldButtonBar />
    </SlateToolbar>

    <SlateContent />
  </SlateEditor>
)

export default SlateRichTextEditor

Keyboard Shortcut

OSShortcut
Apple Logo+b
Windows Logo^+b

API

NameDescription
BoldMarkComponent that holds the html that will wrap the content with bold style.
BoldUtilsGeneric file that holds the util common functions.
BoldButtonButton component that have behaviour to wrap content with bold style.
BoldKeyboardShortcutKeyboard shortcut file that manipulates onKeyDown event inside SlateJS.

TODO

  • Make keyboard shortcut accepts customization

Keywords

FAQs

Package last updated on 08 May 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc