5.1.0 • Published 7 years ago
@slate-editor/embed-plugin v5.1.0
SlateJS embed plugin.
Installation
The @slate-editor/embed-plugin is available as an npm package.
yarn add @slate-editor/embed-pluginUsage
Here is a quick example to get you started:
import React from 'react'
import { SlateEditor, SlateToolbar, SlateContent } from 'slate-editor'
import { EmbedPlugin, EmbedButton } from '@slate-editor/embed-plugin'
const plugins = [
EmbedPlugin()
]
const SlateRichTextEditor = () => (
<SlateEditor plugins={plugins}>
<SlateToolbar>
<EmbedButton />
</SlateToolbar>
<SlateContent />
</SlateEditor>
)
export default SlateRichTextEditorKeyboard Shortcut
| OS | Shortcut |
|---|---|
⌘+e | |
^+e |
API
| Name | Description |
|---|---|
| EmbedNode | Component that holds the html that will wrap the content with embed style. |
| EmbedKeyboardShortcut | Keyboard shortcut file that manipulates onKeyDown event inside SlateJS. |
| EmbedUtils | Generic file that holds the util common functions. |
| EmbedButton | Button component that have behaviour to wrap content with embed 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.f7181996
8 years ago