I am trying to replace a piece of text with a text-field which will
contain the same text with the same font-style, size, etc.
To do this, I'm using something similar to 'element.getParent
().getStyles('font-family','font-style','font-weight',
'font-variant','font-size','text-transform','letter-spacing');' and
then applying the same style to the text-field. Here 'element'
contains the text that is too be replaced. So I'm trying to get the
font related properties of the immediate parent.
This works properly in Safari, Firefox and Chrome. But, it doesn't
work in IE or Opera ( 9.64 ). The text is random sized and generally
'null' values are returned for most properties.
Here is the piece of code I'm using ->
http://paste.mootools.net/f75d20145
Maybe there is a more foolproof way that I can implement this. Thanks!