kopia lustrzana https://github.com/wagtail/wagtail
Deprecation note for #5184
rodzic
d7bad06fe8
commit
12f7ee2f1a
|
@ -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
|
||||
----------------
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
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`.
|
||||
|
|
Ładowanie…
Reference in New Issue