If you are adding html and it has styles, then the styles will be applied. If you cannot get the styles out before injecting the text you will need to add some classes in the html and remove them when loading the html. I suppose!
I thought it will be fairly easy to just dynamically change the text inside the composition.
So, is there a way to "export" the style from the edge-animate composition? I mean - I'd like to polish the style with edge-animate, and then access it (or rather save it) with the html/JS code in the website that my composition is attached to.
Ok, I found out that there is a DOM property "style" - now I have to find a way to use it
After another couple of hours of research, I found out (I'm fairly new to html/js) that in jQuery, there's already a function meant to work with this: .text(). I should change only the text of an element.
I have these lines in a JS function:
var styleAttr = loadedStage.$("myElement").attr("style");
My console shows, that the style is being read correctly, then I change the text, then I re-check the style - and the console shows it's the same as before. But in the composition, the "QWERTY" has no style (just big Arial font).
Anybody knows what's the problem?
Ok, the problem was with the animate composition. The Text styles were not set properly, so any changes resulted in default style. Now everything works fine!
Glad you found the solution (while I was asleep! ). Good luck on your project.