From dce6261b95b911edb892b8350a1a01ea8c429fd3 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 14 Mar 2019 10:00:24 +0100 Subject: [PATCH] Fix "Duplicate explicit target name" warnings on extending_draftail.rst ref: https://github.com/sphinx-doc/sphinx/issues/3921 --- .../customisation/extending_draftail.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/advanced_topics/customisation/extending_draftail.rst b/docs/advanced_topics/customisation/extending_draftail.rst index ccedf345fbfe..6fb1c41cedaf 100644 --- a/docs/advanced_topics/customisation/extending_draftail.rst +++ b/docs/advanced_topics/customisation/extending_draftail.rst @@ -1,7 +1,7 @@ Extending the Draftail Editor ============================= -Wagtail’s rich text editor is built with `Draftail `_, and its functionality can be extended through plugins. +Wagtail’s rich text editor is built with `Draftail `__, and its functionality can be extended through plugins. Plugins come in three types: @@ -61,7 +61,7 @@ These steps will always be the same for all Draftail plugins. The important part * Give enough information to Draftail so it knows how to make a button for the feature, and how to render it (more on this later). * Configure the conversion to use the right HTML element (as they are stored in the DB). -For detailed configuration options, head over to the `Draftail documentation `_ to see all of the details. Here are some parts worth highlighting about controls: +For detailed configuration options, head over to the `Draftail documentation `__ to see all of the details. Here are some parts worth highlighting about controls: * The ``type`` is the only mandatory piece of information. * To display the control in the toolbar, combine ``icon``, ``label`` and ``description``. @@ -70,7 +70,7 @@ For detailed configuration options, head over to the `Draftail documentation `_ on inline styles. +In addition to the initial example, inline styles take a ``style`` property to define what CSS rules will be applied to text in the editor. Be sure to read the `Draftail documentation `__ on inline styles. Finally, the DB to/from conversion uses an ``InlineStyleElementHandler`` to map from a given tag (```` in the example above) to a Draftail type, and the inverse mapping is done with `Draft.js exporter configuration `_ of the ``style_map``. @@ -146,7 +146,7 @@ Here are the main requirements to create a new entity feature: * The conversion usually is more involved, since entities contain data that needs to be serialised to HTML. To write the React components, Wagtail exposes its own React, Draft.js and Draftail dependencies as global variables. Read more about this in :ref:`extending_clientside_components`. -To go further, please look at the `Draftail documentation `_ as well as the `Draft.js exporter documentation `_. +To go further, please look at the `Draftail documentation `__ as well as the `Draft.js exporter documentation `_. Here is a detailed example to showcase how those tools are used in the context of Wagtail. For the sake of our example, we can imagine a news team working at a financial newspaper. @@ -326,7 +326,7 @@ To fully complete the demo, we can add a bit of JavaScript to the front-end in o ---- -Custom block entities can also be created (have a look at the separate `Draftail documentation `_), but these are not detailed here since :ref:`StreamField ` is the go-to way to create block-level rich text in Wagtail. +Custom block entities can also be created (have a look at the separate `Draftail documentation `__), but these are not detailed here since :ref:`StreamField ` is the go-to way to create block-level rich text in Wagtail. Integration of the Draftail widgets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~