Comparison with other solutions
This package is similar to https://github.com/torchbox/wagtail-footnotes but in general:
- our approach is more lightweight
- our approach is similar to what users do in Microsoft Word
- our approach is more flexible, you can use it to make a handcrafted table of contents, for example
- our approach is not structured, so developers have no control over where the notes should be and what they should look like, since any inline selection of text can become a note anchor or reference
- as a consequence, our approach relies more on editor consistency across a site
More technical details:
- we save notes inside the same rich text field/block
- we do not create an extra database model
- we do not require an extra
InlinePanel - you can copy anchors and their references directly from Office documents (only from LibreOffice, for now), the links are created automatically
- future database migrations can be easier as the data is less spread
- We are not limited to 1 set of footnotes per page, you can have many footnotes section if needed, one per rich text field/block
Install
pip install wagtail-notes- Add
'wagtail_notes',toINSTALLED_APPS, before'wagtail.admin', - Add
'wagtailfontawesomesvg',toINSTALLED_APPSif it is not already added. Its position does not matter. - Add
'note-anchor'and'note-reference'features to your Draftaileditor features. Example:WAGTAILADMIN_RICH_TEXT_EDITORS = { 'default': { 'WIDGET': 'flaubert.rich_text.TypographicDraftailRichTextArea', 'OPTIONS': { 'features': [ 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'bold', 'italic', 'link', 'document-link', 'note-anchor', 'note-reference', 'image', 'embed', ], }, }, }
Usage
2 new buttons will appear in the Draftail bar. To use them, you must select some text first. You also need to create a note before making a reference to this note.
Typically, for creating footnotes:
- Add a paragraph to your
RichTextField/RichTextBlock. - Add another paragraph at the end of the same rich text, starting with
1.and containing a comment about something in the paragraph written in step 1. - Select just
1.and click on “Note anchor”, then give a unique name to that note. It can be a number too, but we recommend you to give a more meaningful name, as it makes it easier to change the order of notes later. - Go back to the step 1 paragraph, and write
[1]just after the place that the note will comment (no space). Select[1]and click on “Note reference”. Select the unique name of the note you wrote in step 3. - The
[1]part will be rendered as:<a id="slugified-unique-name-reference" href="#slugified-unique-name" data-note="reference">[1]</a>
The1.part will be rendered as:<a id="slugified-unique-name" href="#slugified-unique-name-reference" data-note="anchor">1.</a>
Metadata
Release files for wagtail-notes 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wagtail_notes-1.0.3.tar.gz | 10.5 kB | Without provenance | Details for wagtail_notes-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wagtail_notes-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for wagtail_notes-1.0.3-py3-none-any.whl |
Total release size: 20.7 kB
Release files / wagtail_notes-1.0.3.tar.gz
| Download URL | wagtail_notes-1.0.3.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9d814c7999f15883cb01a0a6806ab9d0c1fc9443cbd142141638e451d82c569
|
|
BLAKE2b-256 checksum How to use checksums |
3d596827e83cf779a180aece81594d7bc5393d2723a9faf2abbc6c668802a582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|
Release files / wagtail_notes-1.0.3-py3-none-any.whl
| Download URL | wagtail_notes-1.0.3-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd83730eb47063517991bc42a9f6e40897be27e6fe44bb896f7368e171f1bb3d
|
|
BLAKE2b-256 checksum How to use checksums |
d924587058cf30e12de52e40600a8f730732663cfb9e51d21fccad7b32fff4c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|
Security for wagtail-notes 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.