Socket
Socket
Sign inDemoInstall

@slate-editor/image-plugin

Package Overview
Dependencies
8
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @slate-editor/image-plugin

SlateJS image node plugin.


Version published
Weekly downloads
1.2K
increased by28.45%
Maintainers
5
Install size
61.4 MB
Created
Weekly downloads
 

Readme

Source
Nossas logo
Nossas Cidades logo

@slate-editor/image-plugin

SlateJS image plugin.

npm package npm downloads

Installation

The @slate-editor/image-plugin is available as an npm package.

yarn add @slate-editor/image-plugin

Usage

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 SlateRichTextEditor

Keyboard Shortcut

OSShortcut
Apple Logo+shift+i
Windows Logoctrl+shift+i

API

NameDescription
ImageNodeComponent that holds the html that will wrap the content with image style.
ImageKeyboardShortcutKeyboard shortcut file that manipulates onKeyDown event inside SlateJS.
ImageUtilsGeneric file that holds the util common functions.
ImageButtonButton component that have behaviour to wrap content with image style.

TODO

  • Make keyboard shortcut accepts customization

Keywords

FAQs

Last updated on 22 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc