gambitph / Stackable

Page Builder Blocks for WordPress. An Amazing Block Library for the new WordPress Block Editor (Gutenberg).
https://wpstackable.com
GNU General Public License v3.0
328 stars 62 forks source link

ACF - When adding a list item in WYSIWYG editor field, it adds a <br> when displayed on text blocks in frontend #3110

Closed andeng1106 closed 5 months ago

andeng1106 commented 7 months ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Add an ACF field group with WYSIWYG custom field
  2. Set Post Type to Page
  3. Add a new page
  4. In the WYSIWYG field created on step 1, add this:
    <ol>
    <li>Coffee</li>
    <li>Tea</li>
    <li>Milk</li>
    </ol>
  5. Add any Stackable text blocks
  6. Fetch the WYSIWYG field data using Dynamic Content
  7. Save page and view frontend
  8. See that there are spaces/line breaks after each list item
  9. Inspect page and select the Text block
  10. See that after each <li></li>, there's a <br>

Expected behavior Should not encounter line breaks in each list item when fetching ACF WYSIWYG field data via Dynamic Content

Screenshots

https://github.com/gambitph/Stackable/assets/103395655/5cc4531c-1ade-440b-b3fc-5f3f7e7fcf47

bfintal commented 7 months ago

Proposed solution: Let's add an option to ACF wysiwyg whether to allow line breaks or not