Socket
Book a DemoInstallSign in
Socket

@artibox/slate-editor

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@artibox/slate-editor

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
3
200%
Maintainers
2
Weekly downloads
 
Created
Source

@artibox/slate-editor

Slate editor.

npm package npm downloads

Installation

npm install @artibox/slate-editor --save

or

$ yarn add @artibox/slate-editor

Usage

import React from 'react';
import { createArtiboxEditor } from '@artibox/slate-editor';

const initialValue = ...;// from slate

const plugins = [
  // ...
];

const ArtiboxEditor = createArtiboxEditor({
  plugins
});

const YourEditor = () => {
  const [value, setValue] = useState(initialValue);
  const onChange = useCallback(change => setValue(change.value), []);

  return (
    <ArtiboxEditor
      value={value}
      onChange={onChange}
    />
  );
}

API

FAQs

Package last updated on 26 Sep 2020

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