How do I check if two paragraph elements or two spans have the same formats?
I have two paragraphs and when I export them they have the exact same attributes:
<p fontWeight="bold"><span>Hello world</span></p>
<p fontWeight="bold"><span>Hello world</span></p>
I can find a way to get the string with regex and do a string compare but I'm sure there was a method like this which seems more robust:
paragraph1.formatsMatch(paragraph2);
I think this is the answer:
It is always showing true so I have to run some more tests. But I think it only checks users styles and not textlayout format or computed format.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/elements/FlowElement.html