Stackable
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
Describe the bug
- Issue only with ACF
- Issue on text blocks
- Issue for the WYSIWYG field
To Reproduce Steps to reproduce the behavior:
- Add an ACF field group with WYSIWYG custom field
- Set Post Type to Page
- Add a new page
- In the WYSIWYG field created on step 1, add this:
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
- Add any Stackable text blocks
- Fetch the WYSIWYG field data using Dynamic Content
- Save page and view frontend
- See that there are spaces/line breaks after each list item
- Inspect page and select the Text block
- 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
Proposed solution: Let's add an option to ACF wysiwyg whether to allow line breaks or not