From 12f7ee2f1a1d002e2a88aa666bb254da109bae2b Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 8 Apr 2019 16:35:58 +0100 Subject: [PATCH] Deprecation note for #5184 --- docs/advanced_topics/customisation/rich_text_internals.rst | 2 ++ docs/releases/2.5.rst | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/docs/advanced_topics/customisation/rich_text_internals.rst b/docs/advanced_topics/customisation/rich_text_internals.rst index 8164b17b4..9d6d63276 100644 --- a/docs/advanced_topics/customisation/rich_text_internals.rst +++ b/docs/advanced_topics/customisation/rich_text_internals.rst @@ -70,6 +70,8 @@ Any app within your project can define extensions to Wagtail's rich text handlin # add new definitions to 'features' here +.. _rich_text_rewrite_handlers: + Rewrite handlers ---------------- diff --git a/docs/releases/2.5.rst b/docs/releases/2.5.rst index 9e1f270f0..d12f30a87 100644 --- a/docs/releases/2.5.rst +++ b/docs/releases/2.5.rst @@ -142,3 +142,9 @@ Wagtail now has built-in support for new rich text formats, disabled by default: * ``code``, using the ``CODE`` Draft.js inline style, saved as a ```` tag. Projects already using those exact Draft.js type and HTML tag combinations can safely replace their feature definitions with the new built-ins. Projects that use the same feature identifier can keep their existing feature definitions as overrides. Finally, if the Draft.js types / HTML tags are used but with a different combination, do not enable the new feature definitions to avoid conflicts in storage or editor behavior. + + +``register_link_type`` and ``register_embed_type`` methods for rich text tag rewriting have changed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``FeatureRegistry.register_link_type`` and ``FeatureRegistry.register_embed_type`` methods, which define how links and embedded media in rich text are converted to HTML, now accept a handler class. Previously, they were passed an identifier string and a rewrite function. For details of updating your code to the new convention, see :ref:`rich_text_rewrite_handlers`.