5.1.1 • Published 6 years ago
@slate-editor/image-plugin v5.1.1
SlateJS image plugin.
Installation
The @slate-editor/image-plugin is available as an npm package.
yarn add @slate-editor/image-pluginUsage
Here is a quick example to get you started:
import React from 'react'
import { SlateEditor, SlateToolbar, SlateContent } from 'slate-editor'
import { ImagePlugin, ImageButton } from '@slate-editor/image-plugin'
const plugins = [
ImagePlugin()
]
const SlateRichTextEditor = () => (
<SlateEditor plugins={plugins}>
<SlateToolbar>
<ImageButton
signingUrl={
process.env.REACT_APP_API_URL +
process.env.REACT_APP_SIGNING_URL_ENDPOINT
}
/>
</SlateToolbar>
<SlateContent />
</SlateEditor>
)
export default SlateRichTextEditorKeyboard Shortcut
| OS | Shortcut |
|---|---|
⌘+shift+i | |
ctrl+shift+i |
API
| Name | Description |
|---|---|
| ImageNode | Component that holds the html that will wrap the content with image style. |
| ImageKeyboardShortcut | Keyboard shortcut file that manipulates onKeyDown event inside SlateJS. |
| ImageUtils | Generic file that holds the util common functions. |
| ImageButton | Button component that have behaviour to wrap content with image style. |
TODO
- Make keyboard shortcut accepts customization
5.1.1
6 years ago
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