Socket
Socket
Sign inDemoInstall

@pie-lib/pie-toolbox

Package Overview
Dependencies
428
Maintainers
5
Versions
166
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pie-lib/pie-toolbox


Version published
Maintainers
5
Created

Readme

Source

plugins

Custom toolbar

To create a custom toolbar you need to add the following methods to the toolbar object:

type ChangeFn = (key:string, update : object) : void;

type Toolbar = {
  /**
   * return true if this plugin supports this node type
   */
  supports : (node: Slate.Node) : Boolean;
  /**
   * return a React component to edit the data within the node,
   * call toolbarDone to finish editing, call toolbarChange to update
   * the main editor without closing editing.
   */
  customToolbar: (node: Slate.Node, toolbarDone : ChangeFn, toolbarChange: ChangeFn),
  /**
   * Takes the output of the `customToolbar#toolbarDone` call
   * and passes in a value so that you can create a Slate.Change.
   */
  applyChange: (key: string, data: object, value: Slate.Value) : Slate.Change | undefined
}

FAQs

Last updated on 14 May 2024

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