We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修改demo:
运行结果:
期望结果:
The text was updated successfully, but these errors were encountered:
我改造了一下 ParagraphNode 实现了我想要的效果。
class ParagraphNode extends ElementNode { final PConfig pConfig; final Map<String, String> attribute; ParagraphNode(this.pConfig, this.attribute); @override InlineSpan build() { TextAlign? align; if (attribute['align'] == 'center') { align = TextAlign.center; } else if (attribute['align'] == 'right') { align = TextAlign.right; } return WidgetSpan( child: Row( children: [ Expanded( child: Text.rich( TextSpan( children: List.generate(children.length, (index) { final child = children[index]; return child.build(); })), textAlign: align ?? pConfig.textAlign, )) ], )); } @override TextStyle? get style => pConfig.textStyle.merge(parentStyle); }
Sorry, something went wrong.
@zhouzhuo810 你好,目前看来应该是编写的html解析那里没有正确识别换行导致的,因为html的解析属于example模块,所以它算是一个example中的错误例子,而不是markdown_widget本身的解析问题,后面如果有时间的话我会尝试去处理这个问题
No branches or pull requests
修改demo:
运行结果:
期望结果:
The text was updated successfully, but these errors were encountered: