• Before starting this topic, I did indeed search extensively under “hard returns”, “HTML editor”, problems, etc., but kept landing on topics where people were talking about paragraph returns in the visual editor etc. I gather this has likely been talked about already, so this is no doubt a repeat topic, but I’m “stuck in a loop” so to speak. Anyway…

    I’m creating a custom theme, as well as building out the content from my old static site into WP. so, I’m working with both PHP documents edited via Coda, and creating content pages within WP. When I’m writing HTML/CSS, I like to put a return between tags to organize my code (ex: I’ll open a div tag and hit return to put the img tag on the next line to clean it up while writing code). In WP, I only use the HTML editor when I’m creating content within WP. When I write a tag, then hit return to write the next tag on the next line, it’s changing the HTML code, and it no longer renders properly. I discovered this after losing my mind completely with floating left images that kept stepping down a line from one another. I thought I was going pass out from frustration, then realized it was the HTML editor in WP adding something extra to the code.

    Is it possible to disable WP’s interference with the code within the HTML editor? I just want to be able to write code to look organized as I would in Code, or whatever.

    Help, and thinks.

Viewing 15 replies - 1 through 15 (of 16 total)
  • I like CKEditor because it seems much more ‘predictable’ than TinyMCE (the WP editor). However, it does not work with a few other plugins, so I can’t always use it.

    When I can’t use CKEditor, I use the Ultimate TinyMCE plugin which adds lots of functionality to TinyMCE, including its own HTML editor.

    Thread Starter shawncbarry

    (@shawncbarry)

    Thanks for the suggestions. Those look interesting if you prefer the visual editor. my issue isn’t the editor interface, but rather that the code is being “altered” by the HTML editor in a way I can’t see or control. Know what I mean?

    I may not have stated the problem properly – I need to know why WP HTML editor (not the visual editor) is adding extra code or affecting the code when I hit a hard return to break up the run-on code. Hope I’m making sense.

    As I said, both of those plugins offer solutions. Each has its own HTML editor, so you don’t need the TinyMCE HTML editor which messes with your code.

    Thread Starter shawncbarry

    (@shawncbarry)

    Actually, yes, I did look again at the plugin links you mentioned and was just about to post to say “Oh, wait, I get it.” but you beat me to it. I just downloaded CKEdit – I’ll give that a shot.

    Thanks

    Thread Starter shawncbarry

    (@shawncbarry)

    Still happens. Does that mean the code alteration’s not coming from WP, I wonder? is this a php problem?

    Where I encounter the problem is like this:

    This works in WP HTML editor, and in external page code…

    <div>
         <a><img /><img/></a>
    </div>

    This does NOT work in WP HTML editor, but DOES work in external page code…

    <div>
         <a>
                <img />
                <img/>
         </a>
    </div>

    From my experience the HTML editor does not behave the way it is doing for you. Hard returns do not affect the code. Therefore I believe there is something more going on.

    Can you please let me know which plugins are activated in WordPress? It might be a case of clash with a plugin.

    Another option I would suggest is to use the html editor and just add text to it and use the HTML editor buttons to add the html tags if possible (though I know the buttons are for limited HTML tags).

    Thread Starter shawncbarry

    (@shawncbarry)

    I use the following plugins:

    Thread Starter shawncbarry

    (@shawncbarry)

    Thread Starter shawncbarry

    (@shawncbarry)

    …okay, no idea why the links didn’t show up.

    I use VideoJS-pro, BAW Like/Unlike and Admin post Navigation.

    Please try deactivating the plugins and see if the problem persists.

    I can’t tell if you are still using the WP HTML mode or not. If you are, use the CKEdtor ‘Source’ mode or the Ultimate TinmMCE Advanced HTML Editor instead.

    Thread Starter shawncbarry

    (@shawncbarry)

    vtxyzzy – I DID try the CKEdit. Same problem persisted.

    Palimadra – I turned them all off. Same problem.

    Thread Starter shawncbarry

    (@shawncbarry)

    I also tried turning ALL OFF but leaving CKEdit ON, but that didn’t work either.

    Sorry, I’m out of suggestions.

    Thread Starter shawncbarry

    (@shawncbarry)

    Okay, I’ll just have to write code sentence-style, I suppose. Disconcerting that it’s a problem no one else is having. Is it possible to have a corrupt version of WordPress?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘HTML editor: returns affecting code…’ is closed to new replies.