/// <inheritdoc /> public override void Do(DocumentEditorContext context) { var textCaret = _insertionPoint.GetCaret(context).As <TextCaret>(); textCaret = textCaret.InsertText(Text); context.Selection.Replace(textCaret); }
/// <inheritdoc /> public override void Do(DocumentEditorContext context) { var next = _nextPath.Get(context.Document); TextBlockHelperMethods.MergeWithPrevious((TextBlock)next); context.Selection.Replace(_endOfPreviousBlockHandle.GetCaret(context)); }
/// <inheritdoc /> public override void Do(DocumentEditorContext context) { var caret = (TextCaret)_cursorHandle.GetCaret(context); caret.DeleteText(1); context.Selection.Replace(caret); }
/// <inheritdoc /> public override void Do(DocumentEditorContext context) { var caret = (TextCaret)_handle.GetCaret(context); var caretPosition = TextBlockHelperMethods.TryBreakBlock(caret); if (!caretPosition.IsValid) { return; } context.Selection.Replace(caretPosition); }
/// <inheritdoc /> public override void Undo(DocumentEditorContext context) { var caret = (TextCaret)_endOfPreviousBlockHandle.GetCaret(context); TextBlockHelperMethods.TryBreakBlock(caret); context.Selection.Replace(_originalCaretPosition.GetCaret(context)); }