Textarea field not showing paragraphs and line breaks

Support MB Frontend Submission Textarea field not showing paragraphs and line breaksResolved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #35494
    YasmineYasmine
    Participant

    My textarea is showing as one block of text.

    I have added into the fields custom settings white-space => pre-wrap but this does not work. The paragraphs show in the form, but are lost with its presentation.

    I have tried to add this into the CSS too - but no luck. Can you advise - or is it only possible with the WYSIWYG field ?

    Thanks Long.

    #35507
    Long NguyenLong Nguyen
    Moderator

    Hi Yasmine,

    You can add the HTML tag <br> or newline character \n to break lines in the text area.

    #35508
    YasmineYasmine
    Participant

    Hi yes, that works - as does adding <p> tags. But I don't want the user to need to do this. Is there any way for it without adding html into the box?

    Or must it be a WYSIWYG for this functionality? If it needs to be a WYSIWYG, then is there a way to make WYSIWYG look like a basic textarea? (Removing its tabs and buttons?)

    #35525
    Long NguyenLong Nguyen
    Moderator

    Hi,

    If you use the textarea field, the users have to add the HTML tags manually to break lines. To customize the wysiwyg field like a textarea field, you can use the setting options. Screenshot https://monosnap.com/file/uV2pGYNTb7q5euAwBYx4RB0lSL9YXu

    Read more on the documentationhttps://docs.metabox.io/fields/wysiwyg/

    #35526
    YasmineYasmine
    Participant

    Easy - I will do that thankyou!

    #35532
    YasmineYasmine
    Participant

    Follow up question: tiny_mce => false did the job I needed. However, now all my word limits don't work...

    limit => 200
    limit_type => word

    How do I fix this?

    #35534
    YasmineYasmine
    Participant

    Sorry - and another update. tiny_mce=>false is not the answer, as it adds all of the html tags - which is what I want to avoid...

    #35536
    YasmineYasmine
    Participant

    Is there any way to either:

    1. Have a bare-boned WYSIWYG (no toolbar too) AND word limit. Without showing html tags in the editor.

    OR

    2. A textarea that respects new lines without using html ?? white-space => pre-wrap

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