insertPara is handling the undo management internally