5.1.0 ā¢ Published 6 years ago
@slate-editor/strikethrough-plugin v5.1.0
SlateJS strikethrough plugin.
Installation
The @slate-editor/strikethrough-plugin is available as an npm package.
yarn add @slate-editor/strikethrough-plugin
Usage
Here is a quick example to get you started:
import React from 'react'
import { SlateEditor, SlateToolbar, SlateContent } from 'slate-editor'
import { StrikethroughPlugin, StrikethroughButton } from '@slate-editor/strikethrough-plugin'
const plugins = [
StrikethroughPlugin()
]
const SlateRichTextEditor = () => (
<SlateEditor plugins={plugins}>
<SlateToolbar>
<StrikethroughButton />
</SlateToolbar>
<SlateContent />
</SlateEditor>
)
export default SlateRichTextEditor
Keyboard Shortcut
OS | Shortcut |
---|---|
ā + ^ + s | |
ctrl + alt + s |
API
Name | Description |
---|---|
StrikethroughMark | Component that holds the html that will wrap the content with strikethrough style. |
StrikethroughKeyboardShortcut | Keyboard shortcut file that manipulates onKeyDown event inside SlateJS. |
StrikethroughUtils | Generic file that holds the util common functions. |
StrikethroughButton | Button component that have behaviour to wrap content with strikethrough style. |
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