         navigationItem.rightBarButtonItem?.title = NSLocalizedString("Native", comment: "Rich Edition!")
 
         htmlTextView.text = richTextView.toHTML()
+
+        view.endEditing(true)
         htmlTextView.hidden = false
-
-        richTextView.endEditing(true)
         richTextView.hidden = true
     }
 

        // lazy load the editor
        _ = editor

        view.addSubview(richTextView)
        view.addSubview(htmlTextView)


        navigationItem.rightBarButtonItem?.title = NSLocalizedString("HTML", comment: "HTML!")

        richTextView.loadHTML(htmlTextView.text)

        view.endEditing(true)
        richTextView.hidden = false
        htmlTextView.hidden = true
    }
}
