Add spaces only when inserting markup in rich text editor