Skip to content

Commit

Permalink
allow internal links in rtf
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed Jul 17, 2024
1 parent f4b7ab1 commit 93f8666
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
20 changes: 0 additions & 20 deletions pages/static/wagtail_hooks/css/page_wagtail_hooks.css

This file was deleted.

21 changes: 0 additions & 21 deletions pages/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
from django.templatetags.static import static
from django.utils.html import format_html
from django.urls import reverse

from wagtail import hooks

@hooks.register('insert_global_admin_css')
def editor_css():
return format_html(
'<link rel="stylesheet" href="{}">',
static("wagtail_hooks/css/page_wagtail_hooks.css")
)


@hooks.register('insert_editor_js')
def editor_js():
return format_html(
"""
<script>
window.chooserUrls.pageChooser = '{}';
</script>
""",
reverse('wagtailadmin_choose_page_external_link')
)

0 comments on commit 93f8666

Please sign in to comment.