How to use the slate-prop-types.value 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 / editor.js View on Github external
autoCorrect: Types.bool,
    autoFocus: Types.bool,
    className: Types.string,
    defaultValue: SlateTypes.value,
    id: Types.string,
    onChange: Types.func,
    options: Types.object,
    placeholder: Types.any,
    plugins: Types.array,
    readOnly: Types.bool,
    role: Types.string,
    schema: Types.object,
    spellCheck: Types.bool,
    style: Types.object,
    tabIndex: Types.number,
    value: SlateTypes.value,
    ...EVENT_HANDLERS.reduce((obj, handler) => {
      obj[handler] = Types.func
      return obj
    }, {}),
    ...OTHER_HANDLERS.reduce((obj, handler) => {
      obj[handler] = Types.func
      return obj
    }, {}),
  }

  /**
   * Default properties.
   *
   * @type {Object}
   */
github ianstormtaylor / slate / packages / slate-react / src / components / editor.js View on Github external
*
 * @type {Component}
 */

class Editor extends React.Component {
  /**
   * Property types.
   *
   * @type {Object}
   */

  static propTypes = {
    autoCorrect: Types.bool,
    autoFocus: Types.bool,
    className: Types.string,
    defaultValue: SlateTypes.value,
    id: Types.string,
    onChange: Types.func,
    options: Types.object,
    placeholder: Types.any,
    plugins: Types.array,
    readOnly: Types.bool,
    role: Types.string,
    schema: Types.object,
    spellCheck: Types.bool,
    style: Types.object,
    tabIndex: Types.number,
    value: SlateTypes.value,
    ...EVENT_HANDLERS.reduce((obj, handler) => {
      obj[handler] = Types.func
      return obj
    }, {}),
github Foundry376 / Mailspring / app / src / components / composer-editor / slate-editor.tsx View on Github external
* Property types.
   *
   * @type {Object}
   */

  static propTypes = {
    autoCorrect: Types.bool,
    className: Types.string,
    id: Types.string,
    onChange: Types.func,
    readOnly: Types.bool,
    role: Types.string,
    spellCheck: Types.bool,
    style: Types.object,
    tabIndex: Types.number,
    value: SlateTypes.value,
    ...EVENT_HANDLERS.reduce((obj, handler) => {
      obj[handler] = Types.func;
      return obj;
    }, {}),
  };

  /**
   * Default properties.
   *
   * @type {Object}
   */

  static defaultProps = {
    autoCorrect: true,
    onChange: () => {},
    readOnly: false,

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