Stackable icon indicating copy to clipboard operation
Stackable copied to clipboard

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

Open andeng1106 opened this issue 1 year ago • 1 comments

Describe the bug

  • Issue only with ACF
  • Issue on text blocks
  • Issue for the WYSIWYG field

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>
  1. Add any Stackable text blocks
  2. Fetch the WYSIWYG field data using Dynamic Content
  3. Save page and view frontend
  4. See that there are spaces/line breaks after each list item
  5. Inspect page and select the Text block
  6. 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

andeng1106 avatar Mar 19 '24 23:03 andeng1106

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

bfintal avatar Mar 26 '24 03:03 bfintal