I really want to use the RichTextBox in an application I'm finalizing but I have been stymied by the issues I've enumerated below. Firts of all let me provide some background on my particular use so that you can determine if the scenario applies broadly.
Scenario: RichTextBox is used to create Html fragments that are integrated into a finished document where formatting (headings and indents) are adjusted by where the fragment appears in the documents outline hierarchy. Fragments are created as if they are at level 1 (one) and the indent level is programmatically adjusted by where in the outline the fragment appears.
To the best of my knowledge...
Scenario: RichTextBox is used to create Html fragments that are integrated into a finished document where formatting (headings and indents) are adjusted by where the fragment appears in the documents outline hierarchy. Fragments are created as if they are at level 1 (one) and the indent level is programmatically adjusted by where in the outline the fragment appears.
To the best of my knowledge...
- HtmlFormatter translates Hn tags to <p> tags presents a challengs.
- Import process defines classes using some sort of internal naming approach. (I'd like associated classes and their name to be retained.)
- Providing an embedded stylesheet within an imported html document is not used.
- StyleDefinition(s) do not provide an ability to "name" the definition so that they can be programmatically assigned to a paragraph or span. (There may be a StyleProperty that supports this but I could not determine it.)
- I was pursueing the approach of wrapping the existing HtmlFormatter object and extending its utilty but many of the underlying classes are exposed at the Friend level versus Public level which prevents this approach
My application is very concerned with **structure** while the RichTextBox is very concerned with retaining **style**. Whle addressing my point 1 above solves all my concerns points 2 - 5 I believe would be of value to other implementers.
I'm going to have to fall back to using the web based Editor (which presents its own set of restrictions) but I will anxiously be watching developments in the RichTextBox as I believe that once finalized it will be an excellent product.