The PDF widget library provides a Header widget but currently HTML header (H1, H2 etc) elements are converted into TextSpans inside RichText's. I can see how that allows for more flexibility but it also means that very useful functionality of the PDF widget library TableOfContent widget cannot be used to compile a table of contents page.
@alihassan143 I'm happy to contribute a PR for this but I'm not sure if just replacing the existing mapping of Header elements to a Header widget would be ok for you as you have code that supports using AnnotationUrl to I guess allow for headers in the PDF to be url links and I'm not sure that can be preserved by using Header widget unless a child TextSpan widget was added to the Header widget perhaps?
The PDF widget library provides a Header widget but currently HTML header (H1, H2 etc) elements are converted into
TextSpans insideRichText's. I can see how that allows for more flexibility but it also means that very useful functionality of the PDF widget libraryTableOfContentwidget cannot be used to compile a table of contents page.@alihassan143 I'm happy to contribute a PR for this but I'm not sure if just replacing the existing mapping of Header elements to a Header widget would be ok for you as you have code that supports using
AnnotationUrlto I guess allow for headers in the PDF to be url links and I'm not sure that can be preserved by using Header widget unless a child TextSpan widget was added to the Header widget perhaps?