How to use the slate-prop-types.selection function in slate-prop-types

To help you get started, we’ve selected a few slate-prop-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ianstormtaylor / slate / packages / slate-react / src / components / node.js View on Github external
class Node extends React.Component {
  /**
   * Property types.
   *
   * @type {Object}
   */

  static propTypes = {
    annotations: ImmutableTypes.map.isRequired,
    block: SlateTypes.block,
    decorations: ImmutableTypes.list.isRequired,
    editor: Types.object.isRequired,
    node: SlateTypes.node.isRequired,
    parent: SlateTypes.node,
    readOnly: Types.bool.isRequired,
    selection: SlateTypes.selection,
  }

  /**
   * Temporary values.
   *
   * @type {Object}
   */

  tmp = {
    nodeRefs: {},
  }

  /**
   * A ref for the contenteditable DOM node.
   *
   * @type {Object}

slate-prop-types

A set of React prop type checkers for Slate editors.

MIT
Latest version published 4 years ago

Package Health Score

72 / 100
Full package analysis