Skip to main content
Participant
May 15, 2009
Question

Default paragraph formatting?

  • May 15, 2009
  • 2 replies
  • 760 views

How to tell TextFlow to use some default paragraph formating? I want any text with <p></p> paragraph to have default marginBottom of 10.

This topic has been closed for replies.

2 replies

Adobe Employee
May 15, 2009

The margin properties are pretty unique in that they apply to paragraphs, but are non-inheriting, so you can't apply them at the TextFlow level and have them inherit down. This is a problem that we are looking at solving relatively soon. In the meantime, the only solution is to apply the value at every paragraph (<p marginBottom="10"), or to specify it once at the TextFlow level, and add to each paragraph, marginBottom="inherit" (<TextFlow marginBottom="10"><p marginBottom="inherit">...). The latter still enables you to change it once at the TextFlow level and have all paragraphs change to match. But we are aware of this problem, and are looking at ways to address it.

The most likely scenario for a long-term fix is to move away from naming based on the CSS margin properties, and make them inheritable. That would enable you to set the attribute at the TextFlow level and have it inherit down.

Thanks,

- robin

May 15, 2009

I believe that behavior can be achieved by creating a TextLayoutFormat instance that has desired default styles set and assigning it to TextFlow.hostTextLayoutFormat.