             updateHeight()
         }
         else if method.hasPrefix("focus") {
-            delegate?.richEditorTookFocus(self)
+            delegate?.richEditorTookFocus?(self)
         }
         else if method.hasPrefix("blur") {
-            delegate?.richEditorLostFocus(self)
+            delegate?.richEditorLostFocus?(self)
         }
         else if method.hasPrefix("action/") {
             let content = runJS("RE.getHtml()")

        Called when the inner height of the text being displayed changes
        Can be used to update the UI
    */
    func richEditor(editor: RichEditorView, heightDidChange height: Int)

    /**
        Called whenever the content inside the view changes
    */
    func richEditor(editor: RichEditorView, contentDidChange content: String)

    /**
        Called when the rich editor starts editing
    */
    func richEditorTookFocus(editor: RichEditorView)
    
    /**
        Called when the rich editor stops editing or loses focus
    */
    func richEditorLostFocus(editor: RichEditorView)
    
    /**
        Called when the RichEditorView has become ready to receive input
        More concretely, is called when the internal UIWebView loads for the first time, and contentHTML is set
    */
    func richEditorDidLoad(editor: RichEditorView)
    
    /**
        Called when the internal UIWebView begins loading a URL that it does not know how to respond to
        For example, if there is an external link, and then the user taps it
    */
    func richEditor(editor: RichEditorView, shouldInteractWithURL url: NSURL) -> Bool
    
    /**
        Called when custom actions are called by callbacks in the JS
        By default, this method is not used unless called by some custom JS that you add
    */
    func richEditor(editor: RichEditorView, handleCustomAction action: String)
}

/**

        if navigationType == .LinkClicked {
            if let
                url = request.URL,
                shouldInteract = delegate?.richEditor?(self, shouldInteractWithURL:url)
            {
                return shouldInteract
            }
