【问题标题】:Telerik RadEditor - Text disappears upon entering new contentTelerik RadEditor - 输入新内容时文本消失
【发布时间】:2017-12-11 17:46:29
【问题描述】:

这个编辑器让我很头疼。这是我在编辑器中生成的 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ö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 并尝试在设计模式下编辑内容。

有什么办法可以防止这种情况发生吗?谢谢

【问题讨论】:

  • 你在什么浏览器中测试这个?我试图重现该问题并且它按预期工作。我正在使用 Chrome。
  • 在所有浏览器中 :( 。如果你只是尝试在文本之间的某处添加一个空格,整个文本就会消失,只保留图像。
  • 啊,是的,我能够重现它。我可以说这是导致问题的<!-- [if (gte mso 9)] 指令。让我看看这是不是编辑器支持的东西。
  • 我没有看到任何特定于此的文档。直接在内容中使用 mso 条件可能不是最佳实践。我会在文档的顶层使用它们来提供 CSS 类来实现相同的结果。如果这是您在编辑器中绝对需要的功能,例如:您正在创作将包含在电子邮件中的 HTML;我建议提交支持票,以便工程人员查看是否有可行的解决方案。
  • 感谢 Ed 试用。提高支持票将是我的最后选择。

标签: html telerik radeditor


【解决方案1】:

找不到任何解决方法。我必须删除那些 mso 条件才能让事情按需要工作。

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 2019-10-17
      • 2014-02-27
      • 1970-01-01
      • 2011-05-06
      • 1970-01-01
      相关资源
      最近更新 更多