HTML 渲染 - 添加额外代码 (Internet Explorer)
我在项目中使用 Telerik Rad Editor,但我对编辑器中呈现 HTML 的方式有疑问。 我发现一些变化并不理想。尝试以此为例。切换到 HMTL 模式并输入以下代码。
<!--*
<a href="http://www.chillisauce.co.uk/hen-nights/"><img alt="Chillisauce Hen Nights" src="http://www.chillisauce.co.uk/includes/email/email_header_hen.jpg" /></a> *-->
这些“”标签是我们添加的,这样当在设计模式下查看 html 时,部分代码不可见,但实际上是我的模板的一部分。
现在切换到设计模式,然后返回 HTML 模式。您会注意到已添加了额外的代码...
<!--* <a href="http://www.chillisauce.co.uk/hen-nights/" originalAttribute="href" originalPath="http://www.chillisauce.co.uk/hen-nights/"><img alt="Chillisauce Hen Nights" src="http://www.chillisauce.co.uk/includes/email/email_header_hen.jpg" originalAttribute="src" originalPath="http://www.chillisauce.co.uk/includes/email/email_header_hen.jpg" /></a> *-->
如果您切换到设计模式然后再次返回 HTML 模式,这些额外的位将再次添加。
有什么方法可以禁用该功能吗?
编辑:
我已经安装了新版本的 Telerik Controls,但我发现这是 IE 中的问题。在 Fire Fox 等其他浏览器中,这工作正常,但在 IE 中,它添加了额外的代码行。我已经检查过,此问题发生在 IE 版本(6,8 和 9)中。 实际上,我正在 Windows 应用程序的“Web 浏览器控件”中加载 Rad Editor 控件。
I am using Telerik Rad Editor in my project, i have an issue with the way HTML is rendered in editor.
I have discovered some changes that are not ideal. Try this as an example. switch to HMTL Mode and enter the following code.
<!--*
<a href="http://www.chillisauce.co.uk/hen-nights/"><img alt="Chillisauce Hen Nights" src="http://www.chillisauce.co.uk/includes/email/email_header_hen.jpg" /></a> *-->
These "" tags are added by us so that when html is viewed in design mode that part of code is not visible but is actually part of my template.
Now switch to Design Mode and then back to HTML Mode. You will notice that additional code has been added...
<!--* <a href="http://www.chillisauce.co.uk/hen-nights/" originalAttribute="href" originalPath="http://www.chillisauce.co.uk/hen-nights/"><img alt="Chillisauce Hen Nights" src="http://www.chillisauce.co.uk/includes/email/email_header_hen.jpg" originalAttribute="src" originalPath="http://www.chillisauce.co.uk/includes/email/email_header_hen.jpg" /></a> *-->
If you switch to Design Mode and then back to HTML Mode again, these additional bits will have been added again.
Is there any way to disable that functionality?
EDIT:
I have installed new version of Telerik Controls but I found that this is problem in IE. In other browsers like Fire Fox this works OK but In IE it adds that extra line of code.I have checked and this issue occurred in IE version (6,8 and 9).
Actually i am loading Rad Editor control in "Web Browser Control" in my windows application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在 Telerik Rad Editor 论坛中发现了类似的错误报告。
http://www.telerik .com/community/forums/aspnet-ajax/editor/originalpath-originalattribute-injected-into-content.aspx
管理员表示这是一个错误,应该在 5.7.2 版本中修复。您可以尝试将 Telerick Rad Editor 升级到最新版本。
I have found a similar bug report in Telerik Rad Editor forum.
http://www.telerik.com/community/forums/aspnet-ajax/editor/originalpath-originalattribute-injected-into-content.aspx
The admin said that it was a bug and should fixed in version 5.7.2. you can try upgrade your Telerick Rad Editor to the lastest version.
您可以在 Telerik 网站上的在线演示中尝试代码 - http: //demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx
那里没有发生问题,所以它很可能是一个已经修复的错误。您应该获取更新版本的 Telerik 控件并升级您的项目。
You can try the code on the online demos on Telerik's site - http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx
The problem does not happen there, so it's most probably a bug that has already been fixed. You should get a newer version of the Telerik controls and upgrade your project.