Problem/Motivation
There are many interactions with the Paragraphs widget and the JS is operating on ugly low level DOM items.
Paragraphs JS complexity is growing and more and more unreadable. Custom code is repetitive.
Also there's risk to break Paragraphs default JS if customizations change structure.
Proposed resolution
Offer a widget JS wrapper.
It will offer helper methods to deal with deltas or determine the paragraph type easily.
The code spaghetti can be improved by simply injecting this data into data attributes.
While on it, we should also refactor the existing JS.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
miro_dietikerThere are some insights about current limitations:
#2946514-62: Add paragraph before button