Heading formatting, fixed a bug that caused the loss of paragraphs when the whole editor mas emptied.