@react-page-plugins/slate-table
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-alpha.12 • Public • Published

@react-page-plugins/slate-table

ReactPage plugin for slate table

Installation

$ npm install @react-page-plugins/slate-table
$ yarn add @react-page-plugins/slate-table

Usage

import React, { useState } from 'react';
import Editor, { ValueWithLegacy } from '@react-page/editor';
import table from '@react-page-plugins/slate-table';

import '@react-page/editor/lib/index.css';
import '@react-page-plugins/slate-table/lib/index.css';
import 'rc-slider/assets/index.css';

const cellPlugins = [table()];

export default function ExamplePage() {
  const [value, setValue] = useState<ValueWithLegacy>({} as ValueWithLegacy);

  const handleChange = (val: any) => {
    setValue(val);
  };

  return (
    <Editor cellPlugins={cellPlugins} value={value} onChange={handleChange} />
  );
}

Package Sidebar

Install

npm i @react-page-plugins/slate-table

Weekly Downloads

191

Version

0.1.0-alpha.12

License

MIT

Unpacked Size

1.24 MB

Total Files

104

Last publish

Collaborators

  • junminahn