exporting textbuffer formatting



 A couple of other questions.
 I'm writing a filter that will load an HTML document in a TextView (this could be useful to the community also; I could not find such a thing yet).

 A problem I met with the export filter, is when tags overlap. Example: there is a div align="center" which includes a couple of p align="right" or such. I dinamically built tags for the TextBuffer and applied them. Which tag will have precedence when 2 different styles/justifications/etc. are applied to the same piece of text? I noticed unpredicted behaviours. One time the second applied style had precedence, one time the first applied style had precedence.


 Now the big question. To apply a tag I just give the tag name, and the start and end position in an iterator. How do I retrieve tag name, start and end position from a TextBuffer to build an HTML export filter?
My Idea was to iterate through each char of the TextBuffer, and build a table with all the formatting contained in the TextBuffer. Then, I could easily re-build HTML tags. Does it work this way? Which functions should I use?

 Thanks, Fabrizio Lanza


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]