处理 AjaxControlToolkit HTMLEditor 外部的 Tab 键按下
我在同一页面上有来自 AjaxControlToolkit 的 4 个 HTMLEditor 控件。我喜欢该控件所做的一切,除了它处理 Tab 键的方式。我希望用户能够从一个 HTMLEditor 切换到另一个 HTMLEditor,而不是在 HTMLEditor 的内容中插入选项卡。如果可能的话,我希望能够在 HTMLEditors 和其他控件之间进行制表,但如果修复仅在 HTMLEditors 之间起作用,我可以在这种情况下使其起作用。
知道如何做到这一点吗?
我还尝试了 SuppressTabInDesignMode 和 IgnoreTab ,但似乎都没有做任何事情
编辑:这是我正在尝试但不起作用的一些代码。我尝试了上述两个标签的一些组合,但这些示例都没有忽略 Tab 键按下。我重新下载了 ajaxcontroltoolkit 以确保它是最新的。
<asp:ScriptManager runat="server"></asp:ScriptManager>
<HTMLEditor:Editor ID="Editor0" runat="server" TabIndex="1" IgnoreTab="false" SuppressTabInDesignMode="true" Height="200" />
<HTMLEditor:Editor ID="Editor1" runat="server" TabIndex="2" IgnoreTab="false" SuppressTabInDesignMode="false" Height="200" />
<HTMLEditor:Editor ID="Editor2" runat="server" TabIndex="3" IgnoreTab="true" SuppressTabInDesignMode="true" Height="200" />
<asp:Button ID="btnTester" runat="server" Text="testing tab" TabIndex="4" />
将该代码放入 ASPX 页面中,并在页面顶部添加以下两行
<%@ Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"
TagPrefix="ajaxToolkit" %>
<%@ Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit.HTMLEditor"
TagPrefix="HTMLEditor" %>
I have 4 HTMLEditor controls from the AjaxControlToolkit on the same page. I love everything the control does except for how it handles the tab key. I want the user to be able to tab from one HTMLEditor to another instead of insert tabs into the content in the HTMLEditor. If possible I would want to be able to tab between HTMLEditors and other controls, but if the fix will only work between HTMLEditors I can make that work in this instance.
Any idea how to do this?
I have also tried both the SuppressTabInDesignMode and IgnoreTab and neither seems to do anything
EDIT: Here is some code that I am trying and is not working. I have tried a few combinations of the two tags mentioned above, but none of these examples ignores tab key presses. I redownloaded the ajaxcontroltoolkit to make sure it is up to date.
<asp:ScriptManager runat="server"></asp:ScriptManager>
<HTMLEditor:Editor ID="Editor0" runat="server" TabIndex="1" IgnoreTab="false" SuppressTabInDesignMode="true" Height="200" />
<HTMLEditor:Editor ID="Editor1" runat="server" TabIndex="2" IgnoreTab="false" SuppressTabInDesignMode="false" Height="200" />
<HTMLEditor:Editor ID="Editor2" runat="server" TabIndex="3" IgnoreTab="true" SuppressTabInDesignMode="true" Height="200" />
<asp:Button ID="btnTester" runat="server" Text="testing tab" TabIndex="4" />
Drop that code into an ASPX page with the following two lines at the top of the page
<%@ Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"
TagPrefix="ajaxToolkit" %>
<%@ Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit.HTMLEditor"
TagPrefix="HTMLEditor" %>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您要查找的参数是 IgnoreTab=true
参考: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/htmleditor/htmleditor.aspx
The parametre you looking for is the IgnoreTab=true
reference: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/htmleditor/htmleditor.aspx