'Set associated editor/web page:
codeeditor.base.TextEditBaseWidget
browser.WebView'

def set_editor(self, editor, refresh=True):

    self.editor = editor
    try:
        from qtpy.QtWebEngineWidgets import QWebEngineView
    except ImportError:
        QWebEngineView = type(None)
    self.words_button.setVisible((not isinstance(editor, QWebEngineView)))
    self.re_button.setVisible((not isinstance(editor, QWebEngineView)))
    from spyder.widgets.sourcecode.codeeditor import CodeEditor
    self.is_code_editor = isinstance(editor, CodeEditor)
    self.highlight_button.setVisible(self.is_code_editor)
    if refresh:
        self.refresh()
    if (self.isHidden() and (editor is not None)):
        self.clear_matches()
