Ticket #1280 (closed enhancement: fixed)
inserttable improvements
| Reported by: | b at cce dot ac dot nz | Owned by: | liucougar |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Widgets | Version: | 0.3 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
inserttable improvements for Richtext.js in execCommand() (non-ActiveX version). Tested on IE and gecko. Supports attributes and caption.
}else if(command == "inserttable") {
var cols = "<tr>";
for (var i = 0; i < argument.cols; i++) { cols += "<td></td>"; }
cols += "</tr>";
var table = "<table";
for (field in argument.TableAttrs) {
table +=' '+field+'="'+argument.TableAttrs[field]+'"';
}
table += ">";
if(argument.caption){table+='<caption>'+argument.caption+'</caption>';}
table += "<tbody>";
for (var i = 0; i < argument.rows; i++) { table += cols; }
table += "</tbody></table>";
returnValue = this.execCommand("inserthtml", table);
}
-=Bruce Webster (dojo CLA signatory)
Change History
Note: See
TracTickets for help on using
tickets.