Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addTableClone(payload = {}, opts = {}) {
- const table = this.editor.DomComponents.addComponent({
- tagName: 'table',
- type: 'table_clone',
- removable: true,
- draggable: true,
- resizable: true,
- payload: {
- data: new Array(3).fill(null).map(q => new Array(3).fill(null).map(r => ({
- text: utils.randomHEX(),
- id: utils.uuid()
- })))
- },
- copyable: true,
- attributes: { border: 0 },
- 'script-props': ['payload'],
- style: {
- 'z-index': this.getZIndex()
- }, ...opts
- });
- return table;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement