{
this.tags = {
- B : [ 'fontWeight' , 'bold'],
- I : [ 'fontStyle' , 'italic'],
+ B : [ 'fontWeight' , 'bold', 'font-weight'],
+ I : [ 'fontStyle' , 'italic', 'font-style'],
//pre : [ 'font-style' , 'italic'],
// h1.. h6 ?? font-size?
- SUP : [ 'verticalAlign' , 'super' ],
- SUB : [ 'verticalAlign' , 'sub' ]
+ SUP : [ 'verticalAlign' , 'super', 'vertical-align'],
+ SUB : [ 'verticalAlign' , 'sub', 'vertical-align']
};
for (var k in this.tags) {
if (node.style[this.tags[k][0]] == this.tags[k][1]) {
inject.push(k);
- node.style.removeProperty(this.tags[k][0]);
+ node.style.removeProperty(this.tags[k][2]);
}
}
if (!inject.length) {
nn.appendChild(nc);
nn = nc;
});
- for(var i = 0;i < cn.length;cn++) {
+ for(var i = 0;i < cn.length;i++) {
node.removeChild(cn[i]);
nn.appendChild(cn[i]);
}