Line breaks in textarea with Elementor

Support MB Elementor Integrator Line breaks in textarea with ElementorResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28441
    Frédérik Le CorreFré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

    #28453
    Long NguyenLong 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 CorreFré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 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.