protected override bool IsSelectableElement(Element element) { if (element == null) { return false; } if (((WebFormsEditor) base.Editor).EditorMode == WebFormsEditorMode.Template) { if (element is DivElement) { element = element.GetParent(); } if ((element is SpanElement) && (element.GetParent() is BodyElement)) { return false; } } return base.IsSelectableElement(element); }
public static Element GetWrapper(Interop.IHTMLElement element, HtmlControl owner) { Type type; Element element2; string str = element.GetTagName().ToLower(); if (!str.Equals("input")) { type = (Type) wrapperTable[str]; } else { object[] pvars = new object[1]; element.GetAttribute("type", 1, pvars); string str2 = pvars[0].ToString().ToLower(); if (str2.Equals("button")) { type = (Type) wrapperTable["inputbutton"]; } else { type = (Type) wrapperTable[str2]; } } if (type != null) { element2 = (Element) type.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Interop.IHTMLElement) }, null).Invoke(new object[] { element }); } else { element2 = new Element(element); } element2.Owner = owner; return element2; }
protected internal virtual Element GetContentElement(Element bodyElement) { return bodyElement; }
protected internal override Element GetContentElement(Element bodyElement) { if (this.EditorMode == WebFormsEditorMode.Template) { Element child = bodyElement.GetChild(0); if ((child != null) && (child is SpanElement)) { Element element2 = child.GetChild(0); if ((element2 != null) && (element2 is DivElement)) { return element2; } } } return base.GetContentElement(bodyElement); }
protected virtual bool IsSelectableElement(Element element) { if (!this._editor.IsFullDocumentMode) { return (element.TagName.ToLower() != "body"); } return true; }