插入的表格样式会被全局样式覆盖。

This commit is contained in:
lizanle 2015-03-20 18:02:33 +08:00
parent cdad43fdfc
commit 297b3c42b1
1 changed files with 5 additions and 1 deletions

View File

@ -245,6 +245,10 @@ KindEditor.plugin('table', function(K) {
if (bgColor !== '') {
style += 'background-color:' + bgColor + ';';
}
if (border !== ''){
style += 'border:'+border+'px solid;';
}
var html = '<table';
if (style !== '') {
html += ' style="' + style + '"';
@ -271,7 +275,7 @@ KindEditor.plugin('table', function(K) {
for (var i = 0; i < rows; i++) {
html += '<tr>';
for (var j = 0; j < cols; j++) {
html += '<td>' + (K.IE ? '&nbsp;' : '<br />') + '</td>';
html += '<td style="border:solid windowtext 1.0px;" >' + (K.IE ? '&nbsp;' : '<br />') + '</td>';
}
html += '</tr>';
}