5.1.0 ⢠Published 7 years ago
@slate-editor/underline-plugin v5.1.0
SlateJS underline plugin.
Installation
The @slate-editor/underline-plugin is available as an npm package.
yarn add @slate-editor/underline-pluginUsage
Here is a quick example to get you started:
import React from 'react'
import { SlateEditor, SlateToolbar, SlateContent } from 'slate-editor'
import { UnderlinePlugin, UnderlineButton } from '@slate-editor/underline-plugin'
const plugins = [
UnderlinePlugin()
]
const SlateRichTextEditor = () => (
<SlateEditor plugins={plugins}>
<SlateToolbar>
<UnderlineButton />
</SlateToolbar>
<SlateContent />
</SlateEditor>
)
export default SlateRichTextEditorKeyboard Shortcut
| OS | Shortcut |
|---|---|
| ā + u | |
| ctrl + u |
API
| Name | Description |
|---|---|
| UnderlineMark | Component that holds the html that will wrap the content with underline style. |
| UnderlineKeyboardShortcut | Keyboard shortcut file that manipulates onKeyDown event inside SlateJS. |
| UnderlineUtils | Generic file that holds the util common functions. |
| UnderlineButton | Button component that have behaviour to wrap content with underline style. |
TODO
- Make keyboard shortcut accepts customization
5.1.0
7 years ago
5.0.0
8 years ago
5.0.0-alpha.9e6f4feb
8 years ago
5.0.0-alpha.f4219f70
8 years ago
5.0.0-alpha.03550d1c
8 years ago
5.0.0-alpha.c75189d0
8 years ago
5.0.0-alpha.19a19572
8 years ago
5.0.0-alpha.f2d763f7
8 years ago
5.0.0-alpha.f7181996
8 years ago
5.0.0-alpha.dbf50702
8 years ago