Skip to main content

wagtail-external-richtext-link

PyPI - Version PyPI - Python Version


A simple app that gives you the option to add links to the richtext editor in Wagtail that always open in a new tab.

Table of Contents

Installation

$ pip install wagtail-external-link-richtext

Configuration

Add wagtail_external_link to your INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    'wagtail_external_link',
    # ...
]

Add "new_tab_link" to your RICHTEXT_FEATURES in your settings:

RICHTEXT_FEATURES = [
    # ...
    'new_tab_link',
    'link', #IMPORTANT IT MUST ALWAYS BE ABOVE `link`
]

Usage

When you add a RichTextField to your model, you will now see a new button called New tab 🔗 in the richtext editor:

  1. Select the text you want to link or just place the cursor where you want the link to be.
  2. Click the New tab 🔗 button.
  3. If you didn't select any text, enter some text for the link. This will be the text that is displayed.
  4. Enter the URL you want to link to.
  5. Click Submit.
  6. The link will be added to the richtext editor.
  7. Save the page.

Correct way to render the link in your template:

{% load wagtailcore_tags %}

{{ page.body|richtext }}

License

wagtail-external-richtext-link is distributed under the terms of the MIT license.

Metadata

Release files for wagtail-external-link-richtext 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-external-link-richtext 1.1.4
File Size Uploaded
wagtail_external_link_richtext-1.1.4.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-external-link-richtext 1.1.4
File Interpreter ABI Platform
wagtail_external_link_richtext-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release history Release notifications | RSS feed

This release

1.1.4 This release

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page