flutter_tex
flutter_tex copied to clipboard
TeX not parsed
TeX is not parsed when used with the Flutter Html package as a tag extension
Is there something I am not doing right?
Html(
style: {
'p': Style(
fontSize: FontSize(20),
margin: Margins.symmetric(vertical: 10),
),
'body': Style(fontSize: FontSize(20))
},
data: lessonContent,
extensions: [
TagExtension(
tagsToExtend: {"tex"},
builder: (extensionContext) {
return SingleChildScrollView(
child: Center(
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Color.fromARGB(
255, 231, 231, 231),
borderRadius:
BorderRadius.circular(10)),
child: TeXView(
renderingEngine:
TeXViewRenderingEngine.katex(),
child: TeXViewDocument(
extensionContext.innerHtml),
),
)));
}),
],
)
Please help on how I can achieve this.