     }
 
     // Convenience kickoff method for initial setting of wikitext & codemirror setup.
-    @objc func setup(wikitext: String, useRichEditor: Bool, completionHandler: ((Error?) -> Void)? = nil) {
+    @objc func setup(wikitext: String, useRichEditor: Bool, completionHandler: (SectionEditorWebViewCompletionBlock)? = nil) {
         self.useRichEditor = useRichEditor
         update() { (error) in
             guard let error = error else {


    @objc var useRichEditor: Bool = true

    private func update(completionHandler: ((Error?) -> Void)? = nil) {
        evaluateJavaScript("""
            window.wmf.setCurrentEditorType(window.wmf.EditorType.\(useRichEditor ? "codemirror" : "wikitext"));
            window.wmf.update();

        }
    }

    @objc func getWikitext(completionHandler: (SectionEditorWebViewCompletionWithResultBlock)? = nil) {
        evaluateJavaScript("window.wmf.getWikitext();", completionHandler: completionHandler)
    }
    
