Reputation: 67
Its me again come up with another question, how to adjust padding between each paragraphs in AS3..? Actually I'll show you an example that I've coded now.
style.setStyle(".readmore", {fontWeight:"normal", color:"#6184b7", fontSize:11});
style.setStyle("body", {fontStyle:"italic"});
like the code above I want to set a 5px padding-bottom for <p>
tag, now it is 10px default.
Is that possible..? If yes how to write that single line code..?
Thanks in advance!
Paul
Upvotes: 1
Views: 374
Reputation: 1254
The only solution is to add fake tags inside TextField.htmlText
:
Instead of
textField.htmlText = "<p>Some text [...] here</p><p>Some text [...] here</p>"
Do that:
textField.htmlText = "<p>Some text [...] here</p><font size='2'><br></font></p><p>Some text [...] here</p>"
You can do it automatically for each paragraphs:
textField.htmlText = content.replace("</p>", "</p><font size='5'><br></font>");
It will insert margin after all paragraphs. Change to a greater size if you want more space.
Upvotes: 1