Skip to content

Commit

Permalink
Add a note to the activate / decativate event description
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Sep 4, 2024
1 parent 1640e77 commit af730bb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ edited and ordered.
]
.. note::

The following section is outdated; the content editor uses `flex ordering
<https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout/Ordering_flex_items>`__
since 2018, fixing the problem where moving DOM elements would freeze the
associated JavaScript widgets.

These days it should be enough to initialize widgets on page load and
when Django itself emits the `formset:added event <https://docs.djangoproject.com/en/latest/ref/contrib/admin/javascript/>`__.

Here's an example CKEditor integration. Especially noteworthy are the
two signals emitted by the content editor: ``content-editor:activate``
and ``content-editor:deactivate``. Since content blocks can be
Expand Down

0 comments on commit af730bb

Please sign in to comment.