Exemple #1
0
        void EditorContext_SelectionChanged(object sender, EventArgs e)
        {
            if (Attached)
            {
                MarkupRange  range   = EditorContext.Selection.SelectedMarkupRange;
                IHTMLElement element = GetSelectedChildEditField(HTMLElement, range);
                if (element != null)
                {
                    if (_findCommandExecuting)
                    {
                        return;
                    }

                    InlineEditField field = new InlineEditField(element, SmartContent, EditorContext, HTMLElement, this);
                    field.ClearDefaultText();
                    field.PersistFieldValueToContent(true);
                }
                else
                {
                    if (_checkSpellingCommandExecuting)
                    {
                        return;
                    }

                    PersistAllEditFields();
                }
            }
        }
Exemple #2
0
        private void SelectElement(IHTMLElement element)
        {
            PersistEditFieldValues();

            InlineEditField field = new InlineEditField(element, SmartContent, EditorContext, HTMLElement, this);

            field.ClearDefaultText();

            MarkupRange range = EditorContext.MarkupServices.CreateMarkupRange(element, false);

            range.ToTextRange().select();
        }
        private void SelectElement(IHTMLElement element)
        {
            PersistEditFieldValues();

            InlineEditField field = new InlineEditField(element, SmartContent, EditorContext, HTMLElement, this);
            field.ClearDefaultText();

            MarkupRange range = EditorContext.MarkupServices.CreateMarkupRange(element, false);
            range.ToTextRange().select();
        }
        void EditorContext_SelectionChanged(object sender, EventArgs e)
        {
            if (Attached)
            {
                MarkupRange range = EditorContext.Selection.SelectedMarkupRange;
                IHTMLElement element = GetSelectedChildEditField(HTMLElement, range);
                if (element != null)
                {
                    if (_findCommandExecuting)
                        return;

                    InlineEditField field = new InlineEditField(element, SmartContent, EditorContext, HTMLElement, this);
                    field.ClearDefaultText();
                    field.PersistFieldValueToContent(true);
                }
                else
                {
                    if (_checkSpellingCommandExecuting)
                        return;

                    PersistAllEditFields();
                }
            }
        }