from django.utils.html import format_html
from wagtail.wagtailcore import hooks


@hooks.register('insert_editor_js')
def enable_source():
    return format_html(
        """
        <script>
            registerHalloPlugin('hallohtml');
        </script>
        """
    )

[((5, 1, 5, 35), 'wagtail.wagtailcore.hooks.register', 'hooks.register', ({(5, 16, 5, 34): '"""insert_editor_js"""'}, {}), "('insert_editor_js')", False, 'from wagtail.wagtailcore import hooks\n'), ((7, 11, 13, 5), 'django.utils.html.format_html', 'format_html', ({(8, 8, 12, 11): '"""\n        <script>\n            registerHalloPlugin(\'hallohtml\');\n        </script>\n        """'}, {}), '(\n    """\n        <script>\n            registerHalloPlugin(\'hallohtml\');\n        </script>\n        """\n    )', False, 'from django.utils.html import format_html\n')]