예제 #1
0
 private static Interop.IHTMLElement GetElement(Interop.IHTMLEventObj e, IHtmlEditor htmlEditor)
 {
     if (htmlEditor.GetCurrentScopeElement() == null)
     {
         return(e.srcElement);
     }
     else
     {
         return(htmlEditor.GetCurrentScopeElement().GetBaseElement());
     }
 }
예제 #2
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="el"></param>
 /// <param name="keycode"></param>
 /// <param name="htmlEditor"></param>
 public HtmlKeyEventArgs(Interop.IHTMLElement el, Keys keycode, IHtmlEditor htmlEditor)
 {
     handled = false;
     try
     {
         if (el != null)
         {
             SetKey(keycode);
             if (htmlEditor.GetCurrentScopeElement() != null)
             {
                 element = htmlEditor.GetCurrentScopeElement();
                 htmlEditor.Document.SetActiveElement(htmlEditor.GetCurrentScopeElement());
             }
         }
     }
     catch
     {
     }
 }