5.1.0 • Published 6 years ago
@slate-editor/bold-plugin v5.1.0
SlateJS bold plugin.
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
OS | Shortcut |
---|---|
⌘ +b | |
^ +b |
API
Name | Description |
---|---|
BoldMark | Component that holds the html that will wrap the content with bold style. |
BoldUtils | Generic file that holds the util common functions. |
BoldButton | Button component that have behaviour to wrap content with bold style. |
BoldKeyboardShortcut | Keyboard shortcut file that manipulates onKeyDown event inside SlateJS. |
TODO
- Make keyboard shortcut accepts customization
5.1.0
6 years ago
5.0.0
6 years ago
5.0.0-alpha.9e6f4feb
6 years ago
5.0.0-alpha.f4219f70
6 years ago
5.0.0-alpha.03550d1c
6 years ago
5.0.0-alpha.c75189d0
6 years ago
5.0.0-alpha.19a19572
6 years ago
5.0.0-alpha.f2d763f7
6 years ago
5.0.0-alpha.f7181996
6 years ago
5.0.0-alpha.dbf50702
6 years ago
5.0.0-alpha.ecf4264b
6 years ago