def init_app(self, app):
        """Register CodeMirror as a Flask extension
        :param app: Flask instance
        """
        if not hasattr(app, 'extensions'):
            app.extensions = {}
        app.extensions['codemirror'] = CodeMirrorHeaders(app.config)
        app.context_processor(self.context_processor)