开发者

how to retrieve all the styles of a node in tiny mce?

开发者_StackOverflow

I want to retrieve the styles of a node inside the tiny mce instance. With getStyle, I can get only the styles, that I will provide as an argument. But, I don't know which styles will be applied to the node by user. I mean user can apply NUMBER of styles such as font, font color, borders. I simply need to get the whole string inside the style attribute of the node. I tried with the getOuterHTML, but it stripes out the styles.

Thanks in advance.


You can get what you want easily using jQuery:

$(tinyMCE.activeEditor.getBody().firstChild).attr('style');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜