示例#1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //set the default focus for the editor
            TimerHelper.CallbackOnDelay(new InvokeInUIThreadDelegate(sourceControl.Focus), 50);
        }
示例#2
0
        /// <summary>
        /// Removes duplicate extended entries that may exist in the document.
        /// </summary>
        private void RemoveDuplicateExtendedEntries()
        {
            IHTMLDocument3         doc3 = (IHTMLDocument3)HTMLElement.document;
            IHTMLElementCollection extendedEntryElements = doc3.getElementsByName(PostBodyEditingElementBehavior.EXTENDED_ENTRY_ID);

            if (extendedEntryElements.length > 1)
            {
                //delete any extended entry markers that are not this element (use a timer to avoid bug 407544)
                ExtendedEntrySweeper extendedEntrySweeper = new ExtendedEntrySweeper(EditorContext, (IHTMLDocument3)HTMLElement.document, HTMLElement);
                TimerHelper.CallbackOnDelay(new InvokeInUIThreadDelegate(extendedEntrySweeper.DoDelete), 10);
            }
        }