diff --git a/README.rst b/README.rst index 66479e1..70cec6a 100644 --- a/README.rst +++ b/README.rst @@ -26,6 +26,13 @@ Install the package: venv/bin/pip install django-prose-editor +To include nh3 as optional dependency for sanitized HTML, install the extra +"sanitize": + +.. code-block:: shell + + venv/bin/pip install django-prose-editor[sanitize] + Add ``django_prose_editor`` to ``INSTALLED_APPS``: .. code-block:: python @@ -65,6 +72,8 @@ snippet to always pass HTML through `nh3 description = SanitizedProseEditorField() +Install django-prose-editor with the extra "sanitize" to use +``SanitizedProseEditorField``. Convenience ~~~~~~~~~~~ diff --git a/pyproject.toml b/pyproject.toml index 647fe2c..76dea0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,9 @@ optional-dependencies.tests = [ "coverage", "nh3", ] +optional-dependencies.sanitize = [ + "nh3", +] urls.Homepage = "https://github.com/matthiask/django-prose-editor/" [tool.hatch.build]