The API model used to edit tables.
Deletes the specified column from the table. The startIndex value starts from 0, and if endIndex is not specified, only the column corresponding to startIndex is deleted.
var table = editor.getAPIModelById('id'); table.deleteCol(1); // Delete the second column table.deleteCol(1,3); // Delete from second to fourth column |
Deletes the specified row from the table. The startIndex value starts from 0, and if endIndex is not specified, only the row corresponding to startIndex is deleted.
var table = editor.getAPIModelById('id'); table.deleteRow(1); // Delete the second row table.deleteRow(1,3); // Delete from second to foruth row |
Deletes all contents of cells inside the table.
var table = editor.getAPIModelById('id'); table.deleteContents(); |
Adds a column at the specified location.
var table = editor.getAPIModelById('id'); table.insertCol(1); |
Adds a row at the specified location.
var table = editor.getAPIModelById('id'); table.insertRow(1); |
Merges the specified cells.
var table = editor.getAPIModelById('id'); table.mergeCell(0, 0, 1, 2); |
Replaces the element itself with the HTML String passed as an argument.
var table = editor.getAPIModelById('id'); table.replace('<span>Table replaced</span>'); |
Removes the Element itself.
var table = editor.getAPIModelById('id'); table.remove(); |
지정된 열의 너비를 설정합니다.
var table = editor.getAPIModelById('id'); table.setColWidth(1, 100, 'px'); table.setColWidth(1, 20, '%'); |
Sets the height of the specified row.
var table = editor.getAPIModelById('id'); table.setRowHeight(1, 100); |
Sets the height of the table.
var table = editor.getAPIModelById('id'); table.setHeight(200); table.setHeight(200, 'px'); |
Sets the width of the table.
var table = editor.getAPIModelById('id'); table.setWidth(400); table.setWidth(100, '%'); |