thymeleaf中导入editor.md的Markdown遇到的问题
在thymeleaf中引入后端传过来的图片数据,然后在评论区中显示,问题在于只能显示出第一张,第二张图片开始就不能显示,请问该怎么解决?
下面是代码
<div th:each="reply : ${comment.content}">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"
style="width: 50%;" th:id="${reply}">
<textarea style="display: none;" th:text="${reply}"></textarea>
</div>
<script type="text/javascript">
$(function() {
editormd.markdownToHTML(
"${comment.content}",{});
});
</script>
</div>
其中reply是循环出来的图片地址