From 93f86665533efe7f3c86bc2e37d269c99d9b3022 Mon Sep 17 00:00:00 2001 From: Michael Volo Date: Wed, 17 Jul 2024 18:59:27 -0500 Subject: [PATCH] allow internal links in rtf --- .../wagtail_hooks/css/page_wagtail_hooks.css | 20 ------------------ pages/wagtail_hooks.py | 21 ------------------- 2 files changed, 41 deletions(-) delete mode 100644 pages/static/wagtail_hooks/css/page_wagtail_hooks.css diff --git a/pages/static/wagtail_hooks/css/page_wagtail_hooks.css b/pages/static/wagtail_hooks/css/page_wagtail_hooks.css deleted file mode 100644 index 26d3acf09..000000000 --- a/pages/static/wagtail_hooks/css/page_wagtail_hooks.css +++ /dev/null @@ -1,20 +0,0 @@ -.modal-content .link-types :first-child { - /* hide the 'internal' link option from the page chooser */ - display: none; -} - -.modal-content .link-types { - /* ensure the 'before' element can be positioned absolute */ - position: relative; -} - -.modal-content .link-types::before { - /* hide the left '|' bar */ - background: white; - bottom: 0; - content: ''; - left: 0; - position: absolute; - top: 0; - width: 5px; -} \ No newline at end of file diff --git a/pages/wagtail_hooks.py b/pages/wagtail_hooks.py index 6f5803767..854ff4937 100644 --- a/pages/wagtail_hooks.py +++ b/pages/wagtail_hooks.py @@ -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( - '', - static("wagtail_hooks/css/page_wagtail_hooks.css") - ) - -@hooks.register('insert_editor_js') -def editor_js(): - return format_html( - """ - - """, - reverse('wagtailadmin_choose_page_external_link') - )