1
Fork 0

Bump version.

This commit is contained in:
Adam Hill 2020-04-07 12:57:48 -04:00
parent aee9bdf7a5
commit b8c665c08c
4 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,10 @@
# 0.3.0
Adds the ability for snippets to be either a link (current functionality) or a block element.
## Breaking changes
- `snippet` Wagtail feature renamed to `snippet-link`
- template search looks for `{model}_snippet_link.html` instead of `{model}_snippet.html`
# 0.2.2
Update travis-ci configuration.

View file

@ -1,11 +1,13 @@
# wagtail-draftail-snippet
Wagtail has support for adding numerous types of links to `RichTextBlock` content, but there is not a way to tie a link to an arbitrary `snippet` model currently. `wagtail-draftail-snippet` provides a way to create either an `a href` element for a specific `snippet` model based on a template that can be provided, or a completely free-form piece of HTML for a snippet.
The project provides the following draftail (Wagtail Richtext editor) features:
1. `snippet-link`: Allows to create a link using the snippet chooser modal. The link is rendered using the template `{app_name}/{model_name}_snippet_link.html`.
1. `snippet-embed`: Allows to embed a block using the snippet chooser modal. The block is embedded using the template `{app_name}/{model_name}_snippet_embed.html`.
Wagtail has support for adding numerous types of links to `RichTextBlock` content, but there is not a way to tie a link to an arbitrary `snippet` model currently. `wagtail-draftail-snippet` provides a way to add a new button to the Draftail rich text editor, which creates an `a href` element for a specific `snippet` model based on a template that can be provided.
Unsure whether you want to use a snippet link or embed? Embeds have complete flexibility, but 1) break the flow of text in the Draftail richtext editor and 2) can't be used to link arbitrary text. If you want to render a link to a snippet model inside of body copy, then you probably want to use the snippet link. For anything else, the embed can be used.
![Demo of wagtail-draftail-snippet plugin](https://i.imgur.com/pyX25hg.gif)
@ -37,7 +39,7 @@ The package requires Wagtail 2.5 or above.
1. `poetry build`
## Run tests
1. `poetry install --dev`
1. `poetry install`
1. `poetry run pytest`
## Contributors

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "wagtail-draftail-snippet"
version = "0.2.2"
version = "0.3.0"
description = "Associate RichTextBlock text content to a snippet model."
authors = ["Parbhat Puri <me@parbhatpuri.com>", "Adam Hill <ahill@fool.com>"]
repository = "https://github.com/themotleyfool/wagtail-draftail-snippet"

View file

@ -21,7 +21,7 @@ if os.path.exists(readme_path):
setup(
long_description=readme,
name='wagtail-draftail-snippet',
version='0.2.2',
version='0.3.0',
description='Associate RichTextBlock text content to a snippet model.',
python_requires='==3.*,>=3.6.0',
project_urls={