Plugin de WordPress WP-No-Format (Evitar el Formateo/Modificación del Código HTML)

Para los que están acostumbrados a trabajar con el modo HTML del editor de WordPress y odian cuando crea <p>s y reorganiza <br/>s a su voluntad (entre otras cosas), hice este plugin.

Estuve buscando bastante este tipo de funcionalidad y, como no pude encontrar ningun plugin que te dejara decidir qué partes del código querrías dejar “sin formato”, comencé a escribir el mío propio…

WP-No-Format

Es muy fácil de usar. Luego de activarlo, simplemente podés escribir:

<!-- noformat on -->

en el editor de WordPress justo antes de la parte que quieras proteger y, a partir de ese momento, WordPress no va a tocar el código HTML que escribas.

Luego, si querés reanudar el “formateo” standard, tenés que tipear:

<!-- noformat off -->

Y eso es todo!

GNU GPL v3 WP-No-Format está liberado bajo la licencia GNU GPL v3 (attached)…

Actualización (versión 1.1): soporte agregado para la función convert_chars. Antes, algunos caracteres resultaban convertidos a entidades (por ejemplo, al escribir “&&” aparecía como “&#038;&”). [Actualización recomendada]

Acá está la lista de cambios.

Última versión de WordPress con la que fue testeado: 2.8.4

Tu ayuda es valorada!

Todo el contenido ofrecido en este sitio, a menos que se indique lo contrario, es de naturaleza libre. Esto significa que podés compartirlo siempre y cuando lo hagas en forma gratuita y aclarando la fuente.

Si te resultó útil y querés contribuir, podés hacer una donación o, al menos, visitar alguno de nuestros patrocinadores de tu elección; están por todo el sitio.

Incoming search terms for the article:

Related posts:

  1. Actualizado: Soporte de qTranslate para el Plugin de WordPress Google (XML) Sitemaps Generator 3.1.6 (2da Versión)
  2. Cómo eliminar la hoja “Visual” del editor de posts/páginas de WordPress
  3. Hide WordPress Visual Editor Tab 1.01
  4. Soporte de qTranslate para el Plugin de WordPress Google (XML) Sitemaps Generator
  5. Google (XML) Sitemaps Generator con Soporte de qTranslate ahora disponible en el Repositorio de WordPress



34 Responses to “Plugin de WordPress WP-No-Format (Evitar el Formateo/Modificación del Código HTML)”


  • This is my favourite plugin. I had a textarea containing the code for a flash object for people to copy into their pages and wordpress fucked up my code and gave people avery long code that didn’t work.
    This should come with wordpress by default:
    [no_fucking_with_the_code] … [/no_fucking_with_the_code]

    Thank you very much!

    • Hi Liviu G!
      Thanks for you comment! I’m very pleased you liked the plugin!
      I had a very similar problem and couldn’t understand why no one had done something like this.
      Now we can write our code in peace…
      :)

  • Wow, really like this, very simple

  • Unfortunally on my theme “deluxe theme” not working ?
    Can you help me ?
    Tk

  • I installed your plugin to solve a problem with a particular post. When I look at the information saved to the database, it looks all right. But then in the page source, blam! br tags everywhere (and the “noformat on” comment stripped out).

    I’m not using qTranslate, so that easy answer is out.

    I’d be happy to send you the text from the database (a big chunk of XML data in the middle of the post) and the resulting page source if that would be helpful. I’m running WordPress 2.8.4

    • Hi Jerry!

      Thanks for your comment!

      I assume you’re typing everything in the HTML mode of the editor, so there should be no problem…
      Please send me the complete text you’re having problems with, via the “Contact” section of the site… If you wish, you can take it out from the DB so it is as cleanest as possible…
      By the way, have you ever installed any similar plugin to the WP-No-Format? If it’s possible, could you send me the list of plugins you’re using?
      That’s all!
      I’ll see how we can solve this!
      Greetings!

      NeoEGM.

      • I just sent the data, then realized I needed to send you a list of my plugins. At the top of the list was Advanced Fancybox, a lightbox photo gallery plugin. “I never use that,” I thought, and disabled it.

        Hey, presto! The evil line breaks disappeared. A lucky accident has saved us some work! I love when that happens.

        Thanks for your swift response, but I now think the problem lies with them. It seems an odd thing for a lightbox plugin to be messing with, but there you have it.

        • Hi Jerry!

          I was just about to test what you sent me and got your comment!
          I suspected it had something to do with your plugins since I’ve been using it for a long time by now and it’s been working without any kind of problem…
          I’m very glad you solved your problem!
          I’m here for any further comment, problem or suggestion you may have!
          Enjoy it :)

          NeoEGM.

  • I am trying to get this code in, but no luck. It does not show up when I access the web page. Does this only work for posts or every HTML editor (i.e. Pages) in WP? Any ideas?

    Thanks.

    • Hi GC!

      Effectively, the WP-No-Format plugin works with posts and pages…

      I’ve not found ANY code that doesn’t work with the plugin… What code are you trying to post? I’ve not received any in your comment…

      Please post it here (or via the Contact section if it’s very long) and tell me what’s wrong with what you get and your complete plugin list…

      I’ll be waiting for your answer…

      NeoEGM.

  • Hi I have was setting up a website and I was using your no format plugin. Everything was going fine but now when I switch between visual and html, Im losing my page breaks Have you any other reports of this. I am not using any special code just divs and styles.

    Cheers

    • Hi Paddy!

      The WP-No-Format plugin does not touch the page breaks at all while editting the posts/pages. It just ensures they won’t get removed when you visualize them, if you put the corresponging “noformat” tags.

      On the other hand, the Visual editor is not made for working with HTML mode. It does not really work well while switching between modes and lots of plugins make it break your code completely (for example, the qTranslate plugin toches the line breaks while switching between languages).

      If you want have control of your code, I’d recommend you to either disable the WYSIWYG editor or, if you can’t do that (for example, if you use qTranslate), at least, hide its tab.

      If you need further information, just tell me.
      Hope it helps!

      NeoEGM.

  • I am trying to use your plug-in so that I can put MAP data in my posts. WordPress auto adds to all my areas so it screws it up.

    It still does that after using your plug-in.

    Any help?

    • Hi Charles!

      The WP-No-Format plugin works perfectly for that kind of cases…

      Have you added the <!-- noformat on --> and <!-- noformat off --> tags surrounding your code in the HTML mode?

      If you have done it and it still doesn’t work, send me a list of your enabled plugins and the exact code you’re trying to post via the Contact form.

      Hope it helps!

      NeoEGM.

  • Hi there, is there any way to get this kind of functionality on WordPress.com? I use lots of tabs to indent HTML tags (as it was some kind of source code) and I really don’t like the idea of losing it all…

    • Hi dovefight!

      What are you having problems with? With the re-formatting of the HTML code while editing posts or with the reformatting while displaying?

      This plugin is made for the second case…

      WordPress.com rewrites most of your HTML code each time you save a post… And I don’t really know if there’s anything you can do about that, I’ve not used WordPress.com since it’s not customizable enough for me…

      If you’re expecting to be able tu customize those kind of things, I’d recommend you to move to your own installation of WordPress in your own hosting space…

      There are very cheap plans and even free ones…

      Try to search for:

      free hosting php mysql

      If you have your own WordPress installation, you can customize everything at your will: install your own plugins, themes and everything you want…

      You can then move your entire blog (posts+comments) to your new installation…

      Hope it helps!

      NeoEGM.

  • Man, I love a plugin that is simple and direct and does one thing well, like yours. I have a request for a (hopefully) simple addition.

    It starts with a wordpress bug (http://core.trac.wordpress.org/ticket/2691) that is putting incorrect formatting around HTML comments. I am using a plugin that adds stuff at the end of every post, and they conscientiously bracket their added stuff with comments, which then become paragraphicated.

    Would it be possible for you to add a feature (or create a separate plugin) that would block automatic formatting of all content added by other plugins? It would essentially add a marker immediately following the post, before other plugins add their stuff (like social bookmark plugins, for instance).

  • What a great and useful plugin! Going to apply it to several of the blogs I work on right now. I’ve seen other plugins out there that remove all auto formatting, but you can’t pick and choose from where, which is all I want. Thank you!!

    By the way, I notice that you have customized your commens so that your own comments appear differently. I’ve found numerous plugins that enable me to do that, but none that work alongside with comment reply. I see that you have successfully achieved this. Did you use a plugin? May I ask what plugin? It looks great!

    • Hi Abi!

      Thanks for your comment!
      I’m glad the plugin was helpful for you :)

      On the other hand, I must tell you that the specific customization for my comments you’re talking about is just as the K2 theme comes out of the box, so you can download it and check its code in order to port it to your own themes… Other option, is to look for a plugin which does that (which should probably exist)…
      Hope it helps!
      Greetings.

      NeoEGM.

  • Hey, nice idea, I tried it on WP vers 3.0 but it doesn’t work. The no format tags get wrapped in a tag and the code between dissappears. Will you be updating it? I would be happy to pay for something this good if it works around this rotten problem!

  • Edited the last post:

    I have had no luck getting this to work with a google checkout donation button. Google creates a javascript.

    I have tried adding all code to the donation page.

    I have also tried putting the javascript call separately in the header.php and leaving the other code on the page wrapped inside the noformat code.

    I am stumped.

    These are the plugins I have installed
    Akismet
    All in One SEO Pack
    Blog Protector Final
    Broken Link Checker
    Collision Testimonials
    Embed Iframe
    Enhanced Paypal Shortcodes
    Fast Secure Contact Form
    flickr-slideshow-wrapper
    Flickr Gallery
    Google AJAX Translation
    Google XML Sitemaps
    Insere Iframe
    Keyword Statistics
    Onbile
    Ozh’ Admin Drop Down Menu
    PayPal Framework
    Redirection
    Search Everything
    Search Meter
    Secure WordPress
    Sociable for WordPress 3.0
    Social Media Widget
    TinyMCE Advanced
    Universal Post Manager
    Velvet Blues Update URLs
    Viper’s Video Quicktags
    Web Invoicing and Billing
    WordPress Importer
    WordPress PayPal Donation
    Wordpress PDA & iPhone
    WP-Table Reloaded
    Donate
    WP Paypal Donation

  • I couldn’t find any information on whether this plugin supports php5. I was planning on upgrading my server to php5 from php4 but didn’t want to break my site without checking. Thanks in advance.

  • Hi!

    I have made a combination of Multiple Content Block and the “NivoSlider light” plugin to easily manage galleries in pages:

    (example: http://www.sanaryvilla.fr/)
    With this code, all i would have to do is inserting images in my WYSIWYG to create a pretty slideshow…if only auto tags were disabled for this particular bloc!

    Thanks to your plugin, now it works!

    But, as a php newbie, i have a new question: is it possible to put directly the functionality in my template.php, for a particular bloc ? (I am working on a bigger project with slideshows in many pages and I would be really glad if I didn’t have to put in each “slideshow bloc”. (sorry for my bad english, I hope I was clear enough…)

  • Hello. I know these posts are old, but is this working for the latest version of WP? Also, can it work on just one page?

Leave a Reply