-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When quoting a section with an embedded image, the image is shown just before the quoted section, instead of where it was initially.
As an example, the following bbcode:
Quoting text with an image:
[quote=Someone]Image should show below this line
[img]https://source.unsplash.com/random/100x100[/img]
Image should show above this line.[/quote]
rendered as follows:
The following worked around the issue for me:
class MyImgTag extends WrappedStyleTag {
MyImgTag() : super("img");
@override
List<InlineSpan> wrap(
FlutterRenderer renderer, bbob.Element element, List<InlineSpan> spans) {
String url = element.children.first.textContent;
return [
WidgetSpan(
child: Image.network(url,
errorBuilder: (context, error, stackTrace) {
return Text("Error loading image ($url)\n$error");
})),
];
}
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
