react-table-editor
TypeScript icon, indicating that this package has built-in type declarations

1.0.16 • Public • Published

react-table-editor

forked from https://github.com/appleple/a-table.js

usage

import * as React from 'react';
import { TableEditor } from 'react-table-editor'
import { render } from 'react-dom'

const html = `<table>
  <tr>
    <th>test</th>
    <th>test</th>
    <th>test</th>
  </tr>
  <tr>
    <td>test</td>
    <td>test</td>
    <td>test</td>
  </tr>
  <tr>
    <td>test</td>
    <td>test</td>
    <td>test</td>
  </tr>
</table>`

const btns = [
  {
    tag: 'strong',
    className: 'hoge',
    icon: <span>ボタン</span>
  },
  {
    tag: 'a',
    className: 'test',
    icon: <span>リンク</span>
  }
]

render(<TableEditor 
  html={html} 
  btns={btns}
  onChange={html => console.log(html)}
/>, document.getElementById('main'));

Special Thanks

This repository was made thanks to Karakuri!!

https://karakuri.ai/

Readme

Keywords

none

Package Sidebar

Install

npm i react-table-editor

Weekly Downloads

4

Version

1.0.16

License

MIT

Unpacked Size

249 kB

Total Files

38

Last publish

Collaborators

  • steelydylan