 
     // MARK: Accessory views
 
-    private let defaultEditToolbar = DefaultEditToolbarView.wmf_viewFromClassNib()!
-    private let contextualHighlightEditToolbar = ContextualHighlightEditToolbarView.wmf_viewFromClassNib()!
-
-    func gestCustomInputAccessoryView() -> UIView? {
-        return defaultEditToolbar
-    }
-
-    override var inputView: UIView? {
-        return nil
-    }
-
-    override var inputAccessoryViewController: UIInputViewController? {
+    private lazy var defaultEditToolbarView: DefaultEditToolbarView = {
+        let view = DefaultEditToolbarView.wmf_viewFromClassNib()!
+        view.delegate = self
+        return view
+    }()
+
+    private lazy var contextualHighlightEditToolbarView: ContextualHighlightEditToolbarView = {
+        let view = ContextualHighlightEditToolbarView.wmf_viewFromClassNib()!
+        // view.delegate = self
+        return view
+    }()
+
+    // MARK: Input view
+
+    private var inputViewType: TextFormattingInputViewController.InputViewType?
+
+    override var inputViewController: UIInputViewController? {
+        guard let inputViewType = inputViewType else {
+            return nil
+        }
         let textFormattingInputViewController = TextFormattingInputViewController.wmf_viewControllerFromStoryboardNamed("TextFormatting")
-        //        textFormattingInputViewController.delegate = textFormattingDelegate
-        //        textFormattingInputViewController.inputViewType = preferredInputViewType
-        return nil
-    }
-
-    override var inputViewController: UIInputViewController? {
-        let textFormattingInputViewController = TextFormattingInputViewController.wmf_viewControllerFromStoryboardNamed("TextFormatting")
-//        textFormattingInputViewController.delegate = textFormattingDelegate
-//        textFormattingInputViewController.inputViewType = preferredInputViewType
-        return nil
-    }
-
-    func configureCustomInputAccessoryView() {
-        setCustomInputAccessoryView(defaultEditToolbar)
+        textFormattingInputViewController.delegate = self
+        textFormattingInputViewController.inputViewType = inputViewType
+        return textFormattingInputViewController
     }
 
     // MARK: Swizzling input accessory view
 
-    static var customInputAccessoryViewKey = 0
-
-    private lazy var setCustomInputAccessoryView: (UIView) -> Void = { customInputAccessoryView in
-        objc_setAssociatedObject(self, &SectionEditorWebView.customInputAccessoryViewKey, customInputAccessoryView, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
+    func configureInputAccessoryViews() {
+        _ = setInputAccessoryViews
+    }
+
+    private var previousInputAccessoryViewType: InputAccessoryViewType?
+    private var inputAccessoryViewType: InputAccessoryViewType? = .default {
+        didSet {
+            previousInputAccessoryViewType = oldValue
+        }
+    }
+
+    private struct InputAccessoryViewKey {
+        static var Default = "wmf_AssociatedDefaultEditToolbarView"
+        static var Highlight = "wmf_AssociatedHighlightEditToolbarView"
+    }
+
+    private enum InputAccessoryViewType {
+        case `default`
+        case highlight
+    }
+
+    private lazy var setInputAccessoryViews: Void = {
+        objc_setAssociatedObject(self, &InputAccessoryViewKey.Default, defaultEditToolbarView, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
+        objc_setAssociatedObject(self, &InputAccessoryViewKey.Highlight, contextualHighlightEditToolbarView, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
 
         guard let wkContent = self.scrollView.subviews.first(where:  { String(describing: type(of: $0)).hasPrefix("WKContent") }) else {
             assertionFailure("Couldn't find WKContent among scrollView's subviews")

    func highlightRedoButton() {
        //
    }


}

        super.init(frame: .zero, configuration: SectionEditorWebViewConfiguration())
        loadHTMLFromAssetsFile(codeMirrorIndexFileName, scrolledToFragment: nil)
        config.selectionChangedDelegate = self
        scrollView.keyboardDismissMode = .interactive
    }

    required init?(coder: NSCoder) {
