OK, but that means that when a paragraph has multiple styles, we end up with the following structure:
<Paragraph> <Span> <Text>some styled text</Text> </Span> <Text>unstyled text</Text> <Span> <Text>more styled text</Text> </Span> </Paragraph> And we don't currently support Span in TextAreaSkin. I'm trying to implement it, but it's turning out pretty complicated, because now the line-breaking is going to be split between ParagraphView and SpanView. Anyhow, I'll keep working on it, but it's going to take me a little longer. Greg Brown wrote: > I'd prefer to keep it in Element, for a couple of reasons: > > 1) It allows sub-nodes to inherit the styles. > > 2) A TextNode is simply meant to represent a run of text independent of > styling. It should determine any and all styles from its parent (generally > either a Paragraph or a Span). > > G > > On Jun 20, 2010, at 4:20 PM, Noel Grandin wrote: > > >> Hi >> >> Greg, are you particularly attached to having font styling in the >> Element class? The way the code is working out, it's going to be a lot >> simpler if I push font styling attributes down into the TextNode >> class. >> >> In particular, line breaking in the skin becomes a lot simpler (at the >> moment it will break), and it's not like font styling can be applied >> to anything else. >> >> -- Noel Grandin >> >