@artibox/slate-toolbar

<div align="center"> <img src="https://raw.githubusercontent.com/ianstormtaylor/slate/master/docs/images/banner.png" height="200" /> </div>

Usage no npm install needed!

<script type="module">
  import artiboxSlateToolbar from 'https://cdn.skypack.dev/@artibox/slate-toolbar';
</script>

README

@artibox/slate-toolbar

Slate toolbar.

npm package npm downloads

Introduction

Quick and easy way to implement medium like toolbar in your slate editor.

Installation

npm install @artibox/slate-toolbar --save

or

$ yarn add @artibox/slate-toolbar

Usage

import React from 'react';
import { Toolbar as ToolbarIcon } from '@artibox/icons';
import { createArtiboxEditor } from '@artibox/slate-editor';
import { Toolbar } from '@artibox/slate-toolbar';

const plugins = [
  Toolbar.forPlugin({
    disabledBlocks: [
      /* ... */
    ],
    expandedTools: [
      /* ... */
    ],
    collapsedTools: [
      /* ... */
    ]
  })
];

const Editor = createArtiboxEditor({
  plugins
});

export default Editor;

API