Custom Fields
Re-Envisioned
Support MB Elementor Integrator Line breaks in textarea with Elementor

  • Creator
    Topic
  • #28441
    Resolved Frédérik Le Corre
    Participant

    Hi there,

    I've created a textarea as a custom field with MetaBox.
    In the Elementor Theme Builder, I've put a Text Editor Widget on the page, and assigned the Metabox textarea field as dynamic content.
    I've created then a new wordpress article, and using Gutenberg (not Elementor), I've added three lines of text in the textarea, with a "return" at the end of each line. So "\n" are stored in the field.
    But when I look at the page, the 3 lines are on the same line. Basically, the "\n" where not converted to "<br>".
    I've already asked the guys from Elementor, but they can't do anything about that.
    Thanks,
    Fred

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #28453
    Long Nguyen
    Moderator

    Hi,

    The text \n would not be parsed to the HTML tag <br>. You can use the HTML tag <br> in the textarea content to break a line.

    Get more details on the documentation https://docs.metabox.io/fields/textarea/

    #28457
    Frédérik Le Corre
    Participant

    Thanks Long.

    However, I want to use Metabox TextArea so that my customer just have to enter their text (with \n), and I don't want to bother them with <br>.

    This is the point using MetaBox (or ACF, or...) with Elementor templates 🙂

    I will try the sanitize feature to see if I can find a workaround.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.