Telerik RadEditor - 输入新内容后文本消失

时间:2017-12-11 17:46:29

标签: html telerik radeditor

这位编辑给了我一些严重的头痛。这是我在编辑器中生成的HTML。

<p style="text-align: justify;"><!--[if (gte mso 9)]><table cellspacing="0" cellpadding="0" align='left'><tr><td align='left' style="padding-right:10px; padding-top:5px;"><![endif]--><img alt="" width="163" height="180" id="img00" style="padding-top: 5px; margin-right: 10px; max-width: 100%; float: left; width: 118px; height: 127px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Max_Born.jpg/240px-Max_Born.jpg" /><span style="font-family: Verdana;"><img alt="" width="0" height="0" /><!--[if (gte mso 9)]></td><td></tr></table><![endif]-->An atom is the smallest unit of matter. Quantum mechanics is a chapter of physics that studies matter at this incredibly granular level, leading to the invention of personal computers, lasers, and medical imaging devices (MRI), among other game-changing technologies.Today's Doodle celebrates the 135th birthday of Max Born, German physicist and mathematician who was awarded the Nobel Prize for his contribution to the field of quantum mechanics.An outstanding student, Born earned his Ph.D. at G&ouml;ttingen University where he later became a professor of theoretical physics, collaborating with and mentoring some of the most famous scientists of the time.</span></p>

这里的问题是,当我尝试通过键入内容来编辑内容(在设计模式下)时,它会影响HTML标记,并且文本会消失。 您可以使用以下链接重现此问题:Editor Demo。只需粘贴HTML并尝试在设计模式下编辑内容。

有没有办法阻止这种情况发生?感谢

2 个答案:

答案 0 :(得分:0)

无法找到任何解决方法。我不得不删除那些mso条件,以便根据需要使用。

答案 1 :(得分:0)

我的建议是禁用ConvertToXhtml内容过滤器并再次测试:https://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

您也可以通过禁用其他过滤器来进行测试。