/// <inheritdoc/> public override void Insert(InsertionContext context) { int start = context.InsertionPosition; base.Insert(context); int end = context.InsertionPosition; context.RegisterActiveElement(this, new ReplaceableActiveElement(context, start, end)); }
/// <inheritdoc/> public override void Insert(InsertionContext context) { if (targetElement != null) { int start = context.InsertionPosition; string inputText = targetElement.Text; if (inputText != null) { context.InsertText(ConvertText(inputText)); } int end = context.InsertionPosition; AnchorSegment segment = new AnchorSegment(context.Document, start, end - start); context.RegisterActiveElement(this, new BoundActiveElement(context, targetElement, this, segment)); } }