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

        // lazy load the editor
        _ = editor

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


        navigationItem.rightBarButtonItem?.title = NSLocalizedString("Native", comment: "Rich Edition!")

        htmlTextView.text = richTextView.toHTML()

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

