Deprecation note for #5184

pull/5211/head
Matt Westcott 2019-04-08 16:35:58 +01:00
rodzic d7bad06fe8
commit 12f7ee2f1a
2 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -70,6 +70,8 @@ Any app within your project can define extensions to Wagtail's rich text handlin
# add new definitions to 'features' here # add new definitions to 'features' here
.. _rich_text_rewrite_handlers:
Rewrite handlers Rewrite handlers
---------------- ----------------

Wyświetl plik

@ -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 ``<code>`` tag. * ``code``, using the ``CODE`` Draft.js inline style, saved as a ``<code>`` 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. 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`.