为什么 DotNetNuke 文本编辑器控件在 iPad 上总是显示 HTML 代码?
我有一个 DotNetNuke 自定义模块,其中使用 HTML 编辑器允许用户输入一些文本以保存到数据库中。 它适用于所有浏览器,除了 iPad 的 safari,我在编辑器中显示 HTML 标签。
我该怎么做才能让 iPad 显示格式化文本(甚至是纯文本),而不是显示这些标签,因为它们会让用户感到非常困惑。
该控件正在使用:
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx" %>
<div id="divTab2">
<dnn:TextEditor ID="txtNotes" runat="server" Width="900px" />
</div>
web.config 有这样的:
<htmlEditor defaultProvider="DotNetNuke.RadEditorProvider">
<providers>
<clear />
<!--Upgraded by DotNetNuke.TelerikEditorProvider version 5.6.3 - Date: 8/3/2011 1:00:02 AM-->
<!--<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />-->
<!--Upgraded by DotNetNuke.TelerikEditorProvider version 5.6.3 - Date: 8/3/2011 7:33:08 PM-->
<!--<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />-->
<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />
<add name="DotNetNuke.RadEditorProvider" type="DotNetNuke.Providers.RadEditorProvider.EditorProvider, DotNetNuke.RadEditorProvider" providerPath="~/DesktopModules/Admin/RadEditorProvider" />
</providers>
</htmlEditor>
示例: 在 iPad 中,我得到的
<div style="text-align: center;"><strong>Case History Notes - Martha </strong><br /></div><br /><strong>6/24/11</strong>: Referred by Jackie <br /><strong>6/26/11:</strong> Sch. Initial Interview for 6/30; 7:00AM Breakfast at Cafe.<br />
不是预期的
案例历史记录 - Martha
2011 年 6 月 24 日:由 Jackie
6 推荐/26/11:施。 6/30 初次面试; 7:00AM 在咖啡厅享用早餐。
I have a DotNetNuke custom module where I am using an HTML editor to allow uses to enter some text to be saved to a database.
It is working fine for all browsers except IPad's safari where I get the HTML tags showing in the editor.
What can I do to make Ipad show text formatted (or even as plain text) rather than having these tags appear as they are very confusing to users.
The control is using:
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx" %>
<div id="divTab2">
<dnn:TextEditor ID="txtNotes" runat="server" Width="900px" />
</div>
The web.config has this:
<htmlEditor defaultProvider="DotNetNuke.RadEditorProvider">
<providers>
<clear />
<!--Upgraded by DotNetNuke.TelerikEditorProvider version 5.6.3 - Date: 8/3/2011 1:00:02 AM-->
<!--<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />-->
<!--Upgraded by DotNetNuke.TelerikEditorProvider version 5.6.3 - Date: 8/3/2011 7:33:08 PM-->
<!--<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />-->
<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />
<add name="DotNetNuke.RadEditorProvider" type="DotNetNuke.Providers.RadEditorProvider.EditorProvider, DotNetNuke.RadEditorProvider" providerPath="~/DesktopModules/Admin/RadEditorProvider" />
</providers>
</htmlEditor>
example:
In iPad, I get
<div style="text-align: center;"><strong>Case History Notes - Martha </strong><br /></div><br /><strong>6/24/11</strong>: Referred by Jackie <br /><strong>6/26/11:</strong> Sch. Initial Interview for 6/30; 7:00AM Breakfast at Cafe.<br />
rather than the expected
Case History Notes - Martha
6/24/11: Referred by Jackie
6/26/11: Sch. Initial Interview for 6/30; 7:00AM Breakfast at Cafe.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
iThings 上的 Safari 不支持
contentEditable
,这是网络上大多数 rech 编辑面板使用的功能。Safari on the iThings doesn't support
contentEditable
, which is the feature used for most rech edit panels on the web.由于我没有 iPad,因此无法解决此问题。我可以确认桌面版 Safari 工作正常。您是否在较新版本的 DotNetNuke 上尝试过此操作?浏览器和 telerik 定义随着每个版本的发布而更新。如果您由于某种原因无法升级,我会尝试仅升级您的 Telerik 控件。例如,您可以尝试最新版本的 dnnWerk 的 DNN 5 RadEditor Provider。
Since I do not have an iPad, I am unable to troubleshoot this. I can confirm that the desktop version of Safari works fine though. Have you tried this on newer versions of DotNetNuke? The browser and telerik definitions are updated with every release. If you cannot upgrade for some reason, I would try upgrading just your telerik controls. For example, you can try the latest release of the DNN 5 RadEditor Provider by dnnWerk.