Skip to content

表格插件拖动,合并,编辑插件。Merge cells, split cells, drag to resize table , a very usefull table plugin with no dependency.

Notifications You must be signed in to change notification settings

stevefoxuser/html-table-editor-resizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

原生javascript表格插件,可以拖动改变大小,合并单元格等

Demo

安装

npm install

npm run dev

查看 localhost:8080

三种方式 初始化表格

import TableEditor from "./tableEditor"
// better to replace document.body with your own div container
// 最好把body换成某个空的div容器,这个div不要放其他元素
const t = new TableEditor()

t.Create(10, 10, document.body)

// or
t.CreateFromString('<table><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>',document.body)

// or
t.CreateFromElem(document.querySelector('#YourTable'),document.body)

// do some edit .....

// 编辑完表格以后获取编辑后的结果
// get the edited table
console.log(t.GetTable())
console.log(t.GetTableStr())

卧槽,放了这么久了,真就一个屎大都没有啊

About

表格插件拖动,合并,编辑插件。Merge cells, split cells, drag to resize table , a very usefull table plugin with no dependency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published