How about if you group them together in a composite operation? Then the composite operation will contain both the delete and the insert, and is undone as a sinlge unit. Here's a code snippet that groups an insert with an applyFormat for similar reasons:
editManager.beginCompositeOperation();
SelManager.setSelection(insertPos, insertPos);
editManager.insertText(insertText);
SelManager.setSelection(insertPos, insertPos + insertText.length);
var charFormat:TextLayoutFormat = new TextLayoutFormat();
charFormat.fontSize = insertSize;
editManager.applyFormat(charFormat,null,null);
editManager.endCompositeOperation();
Hope this helps,
- robin