【发布时间】:2017-12-29 03:04:18
【问题描述】:
我想在行之间添加一个新行。目前只能在最后一行之后添加新行。 参考:http://getcontenttools.com/
当前的 JS 代码
row = new ContentEdit.TableRow();
_ref = cell.parent().children;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
child = _ref[_i];
newCell = new ContentEdit.TableCell(child.tagName(), child._attributes);
newCellText = new ContentEdit.TableCellText('');
newCell.attach(newCellText);
row.attach(newCell);
}
section = this.closest(function (node) {
return node.type() === 'TableRow';
});
section.attach(row);
【问题讨论】:
-
你能告诉我们你到目前为止做了什么吗? :)
-
row = new ContentEdit.TableRow(); _ref = cell.parent().children;对于 (_i = 0, _len = _ref.length; _i
-
section.attach(row) - 在行中添加新行。我想在所选行之后添加新行。
标签: javascript jquery html content-management-system wysiwyg