A feature for the richtext fields in Wagtail
Project description
wagtail-external-richtext-link
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:
- Select the text you want to link or just place the cursor where you want the link to be.
- Click the
New tab 🔗
button. - If you didn't select any text, enter some text for the link. This will be the text that is displayed.
- Enter the URL you want to link to.
- Click
Submit
. - The link will be added to the richtext editor.
- 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for wagtail_external_link_richtext-1.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e62e84c64e43e18203c43b80cf3bd995e7487f437db0fb411b899237cf72e0 |
|
MD5 | 8a29666df1cb8151965eada5fad76f38 |
|
BLAKE2b-256 | 1b67235b6ec01dde128a1f09a86e886314d96cdf79b8637593c48512a8675ac7 |
Close
Hashes for wagtail_external_link_richtext-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 632418a72eedc0adbb4566804e6939bb0b41a773873995fd348b800ab5d1f6da |
|
MD5 | 99ef58f4e43bffa1851ab34a304efce4 |
|
BLAKE2b-256 | c19a86404547271008bd0f91fb06992a75b9861a74e48e65ea3d6679af9d007e |