Neoclassical Programming Multitude

    @artibox/slate-input-block
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.0 • Public • Published

    @artibox/slate-input-block

    Slate input-block.

    npm package npm downloads

    Introduction

    This package is an util related to input process of editor.
    You can use this package to let user input some string and then do something on the string while confirmed.
    Like link, image, youtube, ...etc.

    Installation

    npm install @artibox/slate-input-block --save
    
    or
    
    $ yarn add @artibox/slate-input-block

    Usage

    import React from 'react';
    import { Facebook as FacebookIcon } from '@artibox/icons';
    import { createArtiboxEditor } from '@artibox/slate-editor';
    import { Toolbar } from '@artibox/slate-toolbar';
    import { createFacebook } from '@artibox/slate-facebook';
    import { createInputBlock } from '@artibox/slate-input-block';
    
    const Facebook = createFacebook();
    const InputBlock = createInputBlock();
    
    const plugins = [
      Facebook.forPlugin(),
      InputBlock.forPlugin(),
      Toolbar.forPlugin({
        collapsedTools: [{ icon: FacebookIcon, hook: Facebook.forToolHook({ setInputConfig: InputBlock.start }) }]
      })
    ];
    
    const Editor = createArtiboxEditor({
      plugins
    });
    
    export default Editor;

    API

    Keywords

    none

    Install

    npm i @artibox/slate-input-block

    DownloadsWeekly Downloads

    4

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    43.4 kB

    Total Files

    70

    Last publish

    Collaborators

    • fantasywind