[CLOSED] Tooltip and KeyMap is not working on htmlEditor

  1. #1

    [CLOSED] Tooltip and KeyMap is not working on htmlEditor

    Hi Team,
    we are using HTMLEditor in our application.we have couple of issues with this editor.

    1.On this Editor we have implemented Ctrl+S Keymap( Shortcut key) functionality for saving the content of editor,but it is not working .It works fine when we set the focus to some other control on this page.If Editor has the focus then it doesn't fire the event.

    2.Editor is not showing tooltips for botton icons like Bold, Italic, Underline etc.,

    we are using fallowing code.

          <ext:KeyMap ID="keySave" runat="server" Target="={Ext.isGecko ? document : Ext.getBody()}">
            <ext:KeyBinding Ctrl="true" StopEvent="true">
                <Keys>
                    <ext:Key Code="S" />
                </Keys>
                <Listeners>
                    <Event Handler="SaveTemplate();" />
                </Listeners>
            </ext:KeyBinding>
        </ext:KeyMap>
    
    <ext:ViewPort ID="ViewPort2" runat="server" AutoHeight="true">
                <Body>
                    <ext:BorderLayout ID="BorderLayout2" runat="server">
                         <Center>
                            <ext:Panel ID="panel2" AutoScroll="false" BodyStyle="padding: 0 0 0 0 px;" runat="server">
                                <Body>
                                    <ext:RowLayout ID="layout1" runat="server">
    
                                        <ext:LayoutRow RowHeight="0.75">
                                            <ext:Panel ID="panel3" runat="server">
                                                <Body>
                                                    <ext:HtmlEditor ID="Editor1" runat="server" Width="930" Height="350">
                                                     
                                                    </ext:HtmlEditor>
                                                </Body>
                                            </ext:Panel>
                                        </ext:LayoutRow>
    
                                 </ext:RowLayout>
                                </Body>
                            </ext:Panel>
                        </Center>
                    </ext:BorderLayout>
                </Body>
            </ext:ViewPort>
  2. #2

    RE: [CLOSED] Tooltip and KeyMap is not working on htmlEditor

    Hi,

    Try the following sample
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        
        <script runat="server">
            protected void Page_Load(object sender, EventArgs e)
            {
                ScriptManager1.AddBeforeClientInitScript("Ext.QuickTips.init();");
            }
        </script>
        
        <script type="text/javascript">
            function checkKey(e){
                if(e.ctrlKey &amp;&amp; e.getKey() === e.S){
                    alert("Saving...");
                }
            }
        </script>
    </head>
    <body>
        <ext:ScriptManager ID="ScriptManager1" runat="server">
        </ext:ScriptManager>
        
        <ext:KeyMap ID="keySave" runat="server" Target="={Ext.isGecko ? document : Ext.getBody()}">
            <ext:KeyBinding Ctrl="true" StopEvent="true">
                <Keys>
                    <ext:Key Code="S" />
                </Keys>
                <Listeners>
                    <Event Handler="alert('Saving...');" />
                </Listeners>
            </ext:KeyBinding>
        </ext:KeyMap>
    
        <ext:ViewPort ID="ViewPort2" runat="server">
                <Body>
                    <ext:BorderLayout ID="BorderLayout2" runat="server">
                         <Center>
                            <ext:Panel ID="panel2" AutoScroll="false" BodyStyle="padding: 0 0 0 0 px;" runat="server">
                                <Body>
                                    <ext:RowLayout ID="layout1" runat="server">
    
                                        <ext:LayoutRow RowHeight="0.75">
                                            <ext:Panel ID="panel3" runat="server">
                                                <Body>
                                                    <ext:HtmlEditor ID="Editor1" runat="server" Width="930" Height="350">
                                                        <Listeners>
                                                            <Initialize Handler="Ext.EventManager.on(this.getDoc(), {keyup: checkKey});" />
                                                        </Listeners>
                                                    </ext:HtmlEditor>
                                                </Body>
                                            </ext:Panel>
                                        </ext:LayoutRow>
    
                                 </ext:RowLayout>
                                </Body>
                            </ext:Panel>
                        </Center>
                    </ext:BorderLayout>
                </Body>
            </ext:ViewPort>
    </body>
    </html>
  3. #3

    RE: [CLOSED] Tooltip and KeyMap is not working on htmlEditor

    Thanks a lot :)it works for us.


    Thanks &amp; regards
    YobNet Team

Similar Threads

  1. [CLOSED] GridPanel Cell Tooltip is not working
    By supera in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 27, 2017, 11:47 AM
  2. [CLOSED] KeyMap inside Panel not working
    By Fredrik in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 02, 2012, 1:51 PM
  3. HtmlEditor not working with Ext.NET 1.0 RC1
    By beufreecasse in forum 1.x Help
    Replies: 2
    Last Post: Jun 13, 2011, 11:07 PM
  4. [CLOSED] KeyMap in Panel not working in mozilla
    By klavsm in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 17, 2010, 10:19 AM
  5. KeyMap not working for whole window
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: May 21, 2009, 1:55 PM

Posting Permissions