WordPress.org

Forums

TinyMCE Editor adding line breaks to Textarea content - WHY?! (14 posts)

  1. CrazySerb
    Member
    Posted 5 years ago #

    Why does the TinyMCE editor keep adding
    line breaks to textarea content...? That's just wrong.

    If I enter this in the WYSIWYG editor, for example:

    <textarea cols="40" rows="7" name="textarea">
    line 1
    line 2
    line 3
    </textarea>

    once saved it comes out like this:

    <textarea cols="40" rows="7" name="textarea"><br />
    line 1<br />
    line 2<br />
    line 3<br />
    </textarea>

    What a heck?

    What if I want the content within the textarea to not have any added tags no matter what...? What am I, stuck in that case?

  2. still giving
    Member
    Posted 5 years ago #

    There is something very wrong with 2.9.1 and the new TinyMCE.

    It seems to suffer from MS Word idiot style code and bloat. It needs fixing or removing now.

    See also: http://wordpress.org/support/topic/353182?replies=1#post-1354890

    and: http://wordpress.org/support/topic/352553?replies=3

  3. CrazySerb
    Member
    Posted 5 years ago #

    Well hopefully in WordPress 3 they take into consideration the last updated version of TinyMCE

    And yes, I've noticed all kinds of funky annoying "features" where <p align="center"> is replaced with something totally different or removed completely... and <div> tags are being rewritten and moved around too.

    What a hell... can't we have a wysiwyg editor with an option NOT to mess with the code placed in it? I mean, I see how valuable the feature to clean up the code and automatically add certain formatting to text can be be to some... but there's a whole forest of people wanting an editor that won't slap its own flavor of coding on top of our code.

    Right now, on one of the sites I can't even directly edit the content inside that tinymce editor... I have to copy it to a text editor, edit it there and paste it back into wordpress in order to preserve all the changes in it and not have them lost by tinymce.

  4. Clay McIlrath
    Member
    Posted 5 years ago #

    It's called HTML mode.. WYSYWIG is exactly that.. What You See Is What You Get. Almost all WYSYWIGS parse the textarea with some kind of nl2br() function. Learn to use the technology and stop blaming software for your idiocy.

  5. nfong
    Member
    Posted 5 years ago #

    Try this in the great 2.9.2 's great editor.. 2.8.x was ok.

    Switch to Visual mode
    Type: Centered Text
    Click center.

    Looks centered and fine. WYSYWIG

    Still in Visual mode, Do a select all on the text and cut it.
    Paste it back. (Still in Visual mode)

    Formatting is lost..

  6. ApexTwo
    Member
    Posted 5 years ago #

    This editor now borders on ludicrous. I really like WP and have been using it for 3-4 years now but TinyMCE is just too temperamental. I have been screwing around with one page for 2 days now.

  7. robertjakobson
    Member
    Posted 4 years ago #

    Clay, stop calling people idiots.

    The problem with the visual editor of WordPress is that most people do NOT - You hear me? - do NOT get what they see. So this is not What You See Is What You Get.

    Line breaks do not work. I mean line breaks in the year of 2010 Common Era do not work in WordPress, how awful and uncreative can it get?

    When I add linebreaks to text they are taken out after saving - worst of all - some are taken out, some are not, it is total chaos. WordPress then adds another div with a seperate class for paragraphs imported into it via paste.

    You see, now nothing is as it seems this is not what you see is what you get.

    Stop calling people idiots. Apologize.

  8. ocube
    Member
    Posted 4 years ago #

    @Clay... come on man... not cool to call people names..

    Ok guys and gals, thanks to the good nature of Google (the search not the company, not that there is anything wrong with the company) I found a line of code that works instead of both CSS and HTML line breaks that WordPress TinyMCE can't fathorm; like robertjakobson said I mean line breaks in the year of 2010, I digress. Anyway here it is: <br clear="none" />

  9. juliedc
    Member
    Posted 4 years ago #

    Cool ocube!

    Only thing is that there are non-coders out there using these sites and they will know nothing of code.

    WordPress - is there a fix for this? It is a real and ongoing issue.

  10. ocube
    Member
    Posted 4 years ago #

    @juliedc If you knew me, you will know I fall into the 'none-coders' category so I agree completely WP really need to sort this out, line break is so basic we shouldn't even be talking about it. Its like not being able to make text bold...

  11. juliedc
    Member
    Posted 4 years ago #

    This will become more important as MU gains traction since it will be all sorts of people using the editor not just programmers.

    It would be great if someone from WordPress could weigh in on this!

  12. juliedc
    Member
    Posted 4 years ago #

    WP 3.0 cannot get a line break or paragraph return. Any help from WordPress on a fix would be great. Thanks!

  13. adhoc1
    Member
    Posted 4 years ago #

    Is there another forum where we might get an answer on this? I'm in the same boat.

  14. Jordan
    Member
    Posted 4 years ago #

    Ditto here - having the exact same problem. It occurs for even without the visual editor. WP still adds the linebreaks on every save.

Topic Closed

This topic has been closed to new replies.

About this Topic