Skip to content

包含div的img无法正常显示 #370

Answered by wjw020206
zxzf1234 asked this question in Q&A
Discussion options

You must be logged in to vote

wangEditor-next 只识别 editor.getHtml() 生成的 html 格式,不可以随意自定义 html 代码
建议使用 <p><img src="http://gips3.baidu.com/it/u=1022347589,1106887837&fm=3028&app=3028&f=JPEG&fmt=auto?w=960&h=1280" border="0"></p>

你用的 demo 应该是这个吧 https://cycleccc.github.io/demo/set-html.html ,这个 demo 可以是因为 setHtml 按钮调用了 dangerouslyInsertHtml 方法,会对 div 进行过滤

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wjw020206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #368 on November 21, 2024 02:06.