WordPress.org

Ready to get started?Download WordPress

Forums

WYSIWYG is stripping html from posts (20 posts)

  1. erikcw
    Member
    Posted 6 years ago #

    Hi,

    When I try to post a page in the latest WordPress, much of my formatting is getting stripped out.

    I keep trying to add a form, but every time I click save, the submit button gets removed some how.

    I've also noticed that my line breaks aren't sticking. I'll put 2 or 3 lines between a couple paragraphs, and after saving they're still right on top of each other.

    I've tested this both in my normal blog as well as a fresh install.

    Is this a bug or am I doing something wrong? Let me know if more info is needed.

    Thanks!

  2. moshu
    Member
    Posted 6 years ago #

    WYSIWYG is not for posting code. It is for posting text.

    If you want to use your own code - you don't need the wysiwyg, so disable it, turn it off for good:
    admin > Users > Your profile.

  3. erikcw
    Member
    Posted 6 years ago #

    Hi Moshu,

    Thanks for your reply. I'm entering code using the source tab (in the case of the form). With the line breaks, I'm just using the enter key in the WYSIWYG. Shouldn't that work???

  4. moshu
    Member
    Posted 6 years ago #

    Shouldn't that work???
    As it stands now - NO, it doesn't.
    When switching between visual/code... the wysiwyg is still active/turned-on while saving the post.
    So, I repeat: turn it off.

  5. Ben Tremblay
    Member
    Posted 6 years ago #

    With respect: "turn it off" isn't a fix.

    I notice the main WYSIWYG thread (aka "Wish List") was "turned off" 11 months ago.

    Excuse me, but when I go to blogger.com *Gack Ptui* I get Visual and Code. When I go to LJ (Are we gonna have to pledge allegiance to Putin?) I get a totally awesome WYSIWYG and a righteous source editor. Heck, I get a usable source editor when I add comments at ITtoolbox. But for some reason I don't get to use an honest source editor in WP.

    To tell the truth I'd be happy to hear that this is a new problem. I was massively gob-smacked with the notion that folk have been putting up with this behaviour for years.

    So ... I repeat: "turn it off" might be a sort of work-around, but it isn't a fix, because the "Source" editor imposes its own set of rules.

    FWIW: I'm doing a survey of other editors (Xinha? I've never liked TinyMCE; I'm really angry at it right now; as I see more of the alternatives I like it even less. What's this I hear about it truncating long posts? *shudder*) When I have something like a short list I'll make a page at codex wiki.

    --bentrem

  6. reggordon
    Member
    Posted 6 years ago #

    I am unable to post code either and my thread on it was deleted. I think this is somethign Wordpess cannot do and the people that run this community can't be bothered answering. Can i add object embed code or not folks? Its a simple question that doesnt seem to be answered anywhere. Sorry for sounding peesed off it's just i dont appreciate coming to a forum to ask for help to be just deleted without question.

    I suppose this will now be deleted. Glory glory wordpress.

  7. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    I am able to post code, at least <p> and <br />,other simple html and embeded video code with no problem. When I am in the code mode I always save it before hitting the wysiwyg.

    Sometimes when I come back in the code mode it looks like the s are gone but in the wysiwyg they are still functioning and in the actual post all is ok.

    So, the key I think is not to flip back and forth between code and wysiwyg or if you do, save (publish) in between.

    You might also try Microsofts Windows Live Writer if you are on that platform. It ties directly to WordPress and seems to work ok.

  8. Ben Tremblay
    Member
    Posted 6 years ago #

    the key I think is not to flip back and forth between code and wysiwyg or if you do, save (publish) in between.

    I think you've hit the nail on the head there. (As someone who uses "Code View" 75% of the time or more, it matters to me.)

  9. here
    Member
    Posted 6 years ago #

    Attempting to collect info on this at:

    http://codex.wordpress.org/How_Wordpress_Processes_Entry_Text

    In my case, I am happy to turn off the visual editor, but require non-savvy users to later touch those pages and posts. I can get a working version on the site, but any future edit by another user using the fancy editor destroys the page/post.

    The code view editor shouldn't process or change a thing -- or this should at least be available for those who desire / require such functionality.

  10. roberthauk
    Member
    Posted 6 years ago #

    This is really annoying! I upgraded WP for several clients and am not able to "leave" the wysiwyg turned off - my clients are not coder geeks! I find it strange that this topic is not answered or if so with words like "we don't want the people to fill in code". Even though WP is open source I'll have to rethink my strategy of providing CMS for my clients... And I think it's an offense to see "code is poetry" in the footer in all forum threads where I try to find a way to enable the "code function" in WP. I'm talking about structuring the posts and pages - not about severe programming - just a possibility for the end-user to push the frikkin "Enter" key to format his pages/posts.

  11. Automatic
    Member
    Posted 6 years ago #

    @roberthauk
    I'd like to hear what your clients sound like

  12. lilqhgal
    Member
    Posted 6 years ago #

    just a possibility for the end-user to push the frikkin "Enter" key to format his pages/posts.

    I agree! If the client wants to have 6 line breaks, he should be able to hit the "Enter" key 6 times and get what he wants. After all, that's what "Word" does, and that's what I compare most WYSIWYG editors to my clients to (ie. if you can type in Word, you can edit your website). I build the sites to look pretty, but the majority of my clients want to edit their own pages. Why shouldn't they be able to do it in the fashion they want?

  13. Anonymous
    Unregistered
    Posted 6 years ago #

    Holy cow...this is a crazy problem!

    Why can't we use the WYSIWYG and type in code as desired? I need some of the features of the WYSIWYG (I'm a novice), but if I keep it on it screws up some of the html I use.

    Argh!

    Please somebody do something about this! I'll bake you cookies :~)

  14. craigsanatomy
    Member
    Posted 6 years ago #

    Has anyone tried RC1 for WP 2.6? I'm wondering if the line breaks issue has been resolved yet? And yes, @roberhauk is right. A platform like WP (which is very simple in almost every OTHER way) should easily offer non-coders the ability to write and post, w/o having to know HTML (even if these are fairly simple tags).

  15. cbriere
    Member
    Posted 5 years ago #

    Hi Moshu:

    We have a problem inserting the code also. So we did as per your recommendation, that is, disabled the editor. Then we created a page, pasted the code, but still don't work. Captcha image fails to display.

    We had to add a plugin called Hana Code so we can paste the code into said plugin and then paste the short generated code into the page. Now, everything works fine.

    So, disabling the editor, seems to disable part of it and not all.

    Charles

  16. editormule
    Member
    Posted 5 years ago #

    Why isn't anyone able to fix this? I've searched all through the forum for days, tried everything, even inserting
    p {
    margin: 0;
    padding: 5;
    margin-top: 5px;
    }
    into stylesheet, and also grabbing a fix -- editor_plugin_script.js from sourceforge and entering it into WP code everywhere I can find a mention of tinyMCE in folders. I am not a geek but I am familiar with CSS and necessary "stuff" for WordPress.

    It is just unbelievable to me that we all keep posting and posting about this problem and there is no fix. I've tried numerous themes, I've disabled plug ins, I've done every fix mentioned in all the forum posts. I am about 48 hours away from leaving WordPress (after being a loyal user since WP's inception).

    I use Firefox, iMac (but have tried Safari and Opera). Have used IE6 and 7 and Windows XP.

    I have lost too many hours of my life trying to fix this stupid problem.

    Somebody please help us.

  17. draghnfly1
    Member
    Posted 5 years ago #

    I'm fighting with this as well. Here's the workaround I came up with:

    <p><font color="white">space</font></p>

    Font color is whatever your background is and you can type in any gibberish.   doesn't work though.

    This works fine in text but not in my form.
    doesn't seem to work either. It's very annoying.

  18. draghnfly1
    Member
    Posted 5 years ago #

    Okay. Upon further exploration I found a trick that works for me.

    Under Users, Your Profile untick the "Use the visual editor when writing box"

    My < p > and < br > and & nbsp ; codes stay put.

  19. ClaytonJames
    Member
    Posted 5 years ago #

    I guess moshu was right on the money in his first response in this very thread.

    WYSIWYG is not for posting code. It is for posting text.

    If you want to use your own code - you don't need the wysiwyg, so disable it, turn it off for good:
    admin > Users > Your profile.

    I hate that darned WYSIWYG.

    :-)

  20. krunk
    Member
    Posted 5 years ago #

    I disagree that everyone using the html editor are capable of doing html code. Often times you will see a video you want to share (i.e. on YouTube) and there's an area where it'll allow you copy and paste code to embed the video onto your website. At that point, it makes sense to switch to the html editor, paste it in the area you want, and switch back to the visual editor.

Topic Closed

This topic has been closed to new replies.

About this Topic