Socket
Book a DemoInstallSign in
Socket

@slate-editor/grid-plugin

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slate-editor/grid-plugin

SlateJS grid block node plugin.

5.1.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source
Nossas logo
Nossas Cidades logo

@slate-editor/grid-plugin

SlateJS grid plugin.

npm package npm downloads

Installation

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

yarn add @slate-editor/grid-plugin

Usage

Here is a quick example to get you started:

import React from 'react'
import { SlateEditor, SlateToolbar, SlateContent } from 'slate-editor'
import { GridPlugin, GridButtonBar } from '@slate-editor/grid-plugin'

const plugins = [
  GridPlugin()
]

const SlateRichTextEditor = () => (
  <SlateEditor plugins={plugins}>
    <SlateToolbar>
      <GridButtonBar />
    </SlateToolbar>

    <SlateContent />
  </SlateEditor>
)

export default SlateRichTextEditor

Keyboard Shortcut

OSActionShortcut
Apple LogoAdd Grid + ^ + g
Apple LogoSplit Row + ^ + r
Windows LogoAdd Grid^ + alt + g
Windows LogoSplit Row^ + alt + r

API

NameDescription
GridNodeComponent that holds the html that will render the content with grid style.
GridRowNodeComponent that holds the html that will render the grid row.
GridCellNodeComponent that holds the html that will render the grid cell.
GridKeyboardShortcutKeyboard shortcut file that manipulates onKeyDown event inside SlateJS.
GridUtilsGeneric file that holds the util common functions.
GridButtonBarComponent that holds all action buttons to handle the grid behaviour.
GridButtonComponent that handle behaviour to wrap content with grid style.
GridSplitRowButtonComponent that handle behaviour to split rows into the grid.

TODO

  • Make keyboard shortcut accepts customization

Keywords

slate

FAQs

Package last updated on 25 Oct 2018

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.