monsieurbiz / SyliusRichEditorPlugin

This plugin add a rich editor on fields to be able to drag and drop elements and edit it.
MIT License
65 stars 37 forks source link

Allow to get UIElements and render them individually #120

Closed Roshyo closed 3 years ago

Roshyo commented 3 years ago

This PR adds 1 new Twig FIlter to get all blocks of a RichEditorField and 2 functions to render elements either from an array of elements, or one by one.

This allows to render any element with a better customization (like allow to surround with custom DOM elements)

maximehuran commented 3 years ago

Maybe the current monsieurbiz_richeditor_render_element filter have to be renamed monsieurbiz_richeditor_render_field ? This will let you use filters for monsieurbiz_richeditor_render_elements and monsieurbiz_richeditor_render_element as filter. We also have to see how to avoid the use of two filters for the plurality.

You can use function for monsieurbiz_richeditor_get_elements, it makes more sense.

jacquesbh commented 3 years ago

Thank you @Roshyo !! 😍

I'll release the RC.8 right now :).