public void Insert(int offset, string text, Interface.AnchorMovementType defaultAnchorMovementType) { if (defaultAnchorMovementType == Interface.AnchorMovementType.BeforeInsertion) { document.Replace(offset, 0, text, OffsetChangeMappingType.KeepAnchorBeforeInsertion); } else { document.Insert(offset, text); } }
public void Replace(int offset, int length, string newText, Interface.AnchorMovementType defaultAnchorMovementType) { document.Replace(offset, length, newText); }