Correctly handle markdown in contenteditable