You are not logged in.
I am trying to replace a very old version of xinha in a site with the latest one.
In the new version, when i change the justify option in a table cell I get this:
<td align="right">
The old behaviour is different. (I don't know if it used to be this way or was modified by the old owner of the site) It's:
<td style="text-align: right;">
Well, I need xinha to use the style attribute.
But even after a long searh I have no idea where to put my hands.
Any help would be greatly appreciated!
Thanks!
Last edited by Ugo (2008-04-24 04:27:53)
Offline
Look like I solved the problem. Here's the hack I did in XinhaCore.js , function execCommand
case "justifyleft":
case "justifyright":
_163.match(/^justify(.*)$/);
var ae=this.activeElement(this.getSelection());
var aepnode=this.getSelection().anchorNode.parentNode;
var aeptag='';
if(aepnode) aeptag=aepnode.tagName.toLowerCase();
if(ae&&ae.tagName.toLowerCase()=="img"){
ae.align=ae.align==RegExp.$1?"":RegExp.$1;
}else if(aeptag=="td"){
aepnode.style.textAlign=aepnode.style.textAlign==RegExp.$1?"":RegExp.$1;
}else{
this._doc.execCommand(_163,UI,_165);
}
break;
Offline
...but it doesn't work when there is a selection of cells instead of a single one
Offline