Make Wordpress Editor Less Evil

This Friday, Jesper and I had a chat about things we don’t like about the current WordPress WYSIWYG editor. In particular when trying to write code examples in our posts:

Jesper: One change I really would appreciate in the next Wordpress would be the ability to shift wysiwyg/code editor directly on the edit page

(Now we have to change it on the user prefs page)

Thomas: now = today

Jesper: aggreed! the sooner the better!

I would like always to put my setting to wysiwyg off and turn it on when editing a post individually. Too often I have burnt my fingers and messed up posts containing code, blockquotes or formatted whitespace

If the control were moved to the edit page I could easily write wysiwyg when needed and avoid it when it would mess up my post

Thomas: Yes… it should be possible to tell WordPress that a given post should always open with WYSIWYG off (or on) whenever it is edited… dismissing the default settings

Jesper: exactly!

wysiwyg MUST be off by default because it’s darn destructive! (at least in the current versions of the wysiwyg editors)

Thomas: I wonder if there exists some WP plugins out there that do this already

Jesper: Good question!

Thomas: … or even better doesn’t mess up custom code or HTML

(I mean… hacks WP so it doesn’t)

Jesper: I hate the double/single quotes that WP replaces.

All code examples stop working unless the author manually replaces:

'(single quote) with '

"(double quote) with "

Thomas: I think that there is a simple solution to the quote issue… it must be fairly simple to change that

*searching for a fix*

Sent at 11:04 PM on Friday

Thomas: hmmm it seems to be hard to find

Is the problem that you write a regular quote and WordPress translates it into a html entity or the other way around?

Jesper: The problem is when posting code snippets, HTML or JavaScript for instance. The regular quote (double quote) is automatically translated to the angled double quotes — the same illness as Word does by default.

It’s an illness, in my opinion.

Leave it up to the user to actively change my text

Don’t spoil my code snippets by default.

Making normal quotes in normal text pretty is just not a great tradeoff …

Thomas: depends… the quotes them selves look great when wrapping sentences – but doesn’t work for code – I agree

After this chat I did some googling and found – as I expected – that we are not alone when it comes to the angled quote issue. The quote replacement is actually called “Smart Quotes” in WordPress, and there is a good discussion on the topic over at WordPress Support.

I also found a very good blog-article on the subject by Aaron Russell called “Trials and tribulations of using WordPress to display code syntax“.

What we want…

The most optimal solution would be a WordPress plugin that simply disables smart quotes inside <code>…</code> blocks. To top it of it should also escape the &, > and < characters.

Can you help?

Do you know any plugins that actually do what we would like? Any settings we overlook in WordPress? If not, I guess we will have to convince somebody into changing a future WordPress version.

Technorati Tags: , , , , , ,

74 Responses to “Make Wordpress Editor Less Evil”

  1. Michael Clark Says:

    Ok, I think I’ve got what you want. Check out my brand new plugin, CodeQuote. Test it out and let me know what you think, of if there are other entities besides apostrophes and quotation marks that should be tweaked. I’m looking into how WP handles ampersands and less than and greater than symbols also. http://www.planetmike.com/journal/plugins/codequote/

  2. Home Builder Says:

    Michael,

    Thanks for the plug in. I also hate the WYSIWYG editor that word press uses. I would much rather hand code everything. I usually keep a copy of each post on my computer with the original code so I can copy and paste it into WP if I need to edit a post and not worry about it getting screwed up.

  3. Emre Yashin Says:

    I think there was an option in Wordpress admin area to turn off WYSIWYG editor. (wow it was hard to code the editors name :)) or maybe i am mistaking it with another script. still it’s worth to check again.

  4. Mark Blaszczyk Says:

    hey cool cheers planning to put some code snippits soon on my blog also, thanks for sharing.

  5. n252 Says:

    is there any WordPress WYSIWYG addon to change default WYSIWYG ?

  6. Tasarim Says:

    Michael,

    Thanks for the plug in. I also hate the WYSIWYG editor that word press uses. I would much rather hand code everything… :)

  7. Ekleizle Says:

    yeah i dont like that wp version.
    i hope they make it better !

  8. Lion head Says:

    open the instal folder find editor and then comment it
    you can even replace it fck editor its better than word press editor

  9. Weno Says:

    Thanks for plugin , but i don’t understand how install it

  10. EKoL Says:

    Thanks for information

  11. Kpraldr Says:

    Thanks for the plug in. I read the article with pleasure.

  12. Roman Linker Says:

    Thanks for information. I also hate the wysiwyg editor that word press uses.

  13. Serhio Ramper Says:

    Hallo, very interesting article. I completely agree with Kpraldr.

  14. Inna Garter Says:

    I olso keep a copy of each post on my computer with the original code.

  15. Bogdan Says:

    I have a “quote” issue as well. Does Michael’s plugin work?

  16. Michael Clark Says:

    Hi, My CodeQuote plugin has a few bugs in it. Grumble, grumble. I need to sit down and work out the problems. Basically, if you have multiple lines you are needing to quote, my plugin fails, or at least doesn’t work completely. :(

  17. Alan Crane Says:

    Do i need to install the plugin on a server?
    I only have a abc.wordpress.com – the free blog!
    How can i use plugins?

  18. kerrys Says:

    Thanks for the plug in. I read the article with pleasure. But How can i use plugins?

  19. Tim Says:

    I would appreciate some reviews on Michael’s plugin if anyone has used it.
    Thanks
    Plugin

  20. John Elar Says:

    This is a great post. It is a very nice blog too. I add it to my favorites. Thank you

  21. Navier Says:

    Hi,

    Do you really need a plugin to escape the “&, > and <” characters?

    I use wordpress myself, and with some PHP this can be done quite easily.

    Anyway, i think the wordpress editor is cumbersome :/

  22. naruto characters Says:

    Some people can be mean and this is the way of the world while other people are quite nice. This is a very long and interesting article please keep up the great work on bloggin.

  23. Siset Says:

    wysiwyg editor that word press use is sucks

  24. trabzonspor Says:

    Thanks for the plug in. I read the article with pleasure.

  25. Snowalker Says:

    Personal I like the smart quotes… Of course if you want more freedom in editing your post that plugin is very useful.

  26. Classifieds Steve Says:

    Yeah I quite like it too, but the extras you can do with the plugin make it well worth while.

  27. Brenda Quiles Says:

    Who know good wordpress plugin for working with images?

  28. Card Says:

    Brenda Quiles, for my point of view, the best plugin for working with images is ImageManager

  29. Jeremy G. Says:

    I’d say try out CodeQuote, it’s worked nicely for me, but I do agree that I wish WP would just fix this issue rather than us having to use a band aid.

  30. Techy Bob at Quantum Leap Technologies Says:

    I tried CodeQuote last night and it seems to work well.

    Thank you very much for sharing.

    P.S. – Does anyone know if/when WP plans to support full blown SQL server.

    Regards,

    Bob

  31. Bob Dunn Says:

    I could never understand why wordpress has that horrible WYSIWYG editor. I think that WP should be making things more easy for users. I found it all a bit too difficult which is why I ended up using blogger, which I know is terrible but at least anyone can use it.

  32. Nick Caverson Says:

    Ha, these comments are a joke… I mean, does anyone have anything of substance to say here. Everyone is chiming in and saying the have a blog and it’s a problem but there is no substance whatsoever. Can someone that understands this completely please answer Thomas’ question.

    Do you know any plugins that actually do what we would like? Any settings we overlook in WordPress?

    Stop all the pointless chatter just so you can say you commented, grab some juice and run. Somebody answer Thomas’ question or shut the hell up.

  33. Discount Code Boy Says:

    The WYSIWYG editor was ok for general editing but the CodeQoute makes posting to my discount code site soooooo much easier :)

    Thanks for the plugin

  34. mike @ bargain laptop computer shop Says:

    Has anyone used Michaels plug in yet?

    I actually like the wysywig editor since I learned how to use WP with it. the only challenge is when I try to embed a you tube.

    for that I need to disable, then re enable.

  35. kurye Says:

    thanks you messages

  36. vince Says:

    I like the quotes… whatever it’s needed a new plug-in based on more buttons because a lot of us aren’t web designers.

  37. guinness gifts Says:

    I’ve tried Michaels plugin and it works fine for me.

  38. Graduation Quotes Says:

    CodeQuote is a good plugin not the top of the line but sufficient for what I needed.
    Thanks!

  39. Someone Says:

    “Users” > “Your Profile” > “Use the visual editor when writing” (turn it off).

  40. matt @ cheap drum sets Says:

    to the question of which plugins seem to work well, I always use all-in-one-seo pack, as it gives alot of functionality for seo’ing a WP blog.

    Another one that I use and I like is What Would Seth Godin do. It allows you to put in anything you want and it shows up on every page.

    Lastly, one I hear that works well, although still looking for is related post plug in. That one will find older posts on your blog and list them with related keywords. It helps add more content to the post, and can get readers to more aged posts.

  41. Don Says:

    I’ve used the plugin too, works fine here…

  42. kim | The book Whiz Says:

    Hey all,

    I have a blog that is on WP 2.6, and I was able to insert a you tube vid in to the html yesterday, no problems.

    The new update may have solved the issue.

    kim

  43. Bookmark Says:

    I think they’ve made improvements in the WP 2.6 version. However, like others above me, I still like to code by hand. What Lion head said is interesting… You can take out the editor and replace the WYSIWYG editor?! I need to check that out…

  44. Como Emagrecer Rapido Says:

    I use a plugin to execute php in the pages of the blog, and display a google map. When I do posts I always use the WSIWYG editor and of course, when I go into the pages to edit them all the code goes away. What I do here is open a post, disable the WYSIWYG editor and then go to edit the page! That feature with the setting saved for each post and page would be great!

  45. tony Says:

    I haven’t edited any of post till now but I think new Wordpress is now free of such things. i shall be checking it by editing some of post in new wordpress2.6.2. Anyhow I always write content in MS Word then copy it to Notepad and then transfer it to Wordpress. The problem I have with wordpress is its image manipulation. That should be handled fairly and am not satisfied by their current manipulation.

  46. sohbet Says:

    Brenda Quiles, for my point of view, the best plugin for working with images is ImageManager

  47. sharon Says:

    Yes, I agree with tony that 2.6.2 has taken care of those issues. I gotta learn coding, for me wysisyg is a crutch!

  48. Pablo Ruiz Says:

    I think the latest version of WP has resolved some of the WYSIWYG editor problems. I would agree that blogger is much easier to for the person who doesn’t code.

  49. Neal Says:

    Wordpress editor can be confusing at times. I rather use themes that have some kind of back end management system. I dont know much about wordpress and thats why I do that .

  50. Mike Rutkowski Says:

    Does anyone know if there is a way to disable smart quotes within Word itself?

    I write articles for ezinearticles in word first, then copy and paste into ezine’s interface. All formatting comes over fine, except the damn smart-quotes, which I have to go back and remove by hand.

    BTW, FCKeditor works pretty well for me, other than some minor spacing issues that happen, much better than default interface…

  51. Geeks-In-Route Says:

    The following link will tell you how to disable smart quotes: http://ezinearticles.com/?Microsoft-Word-Smart-Quotes-and-Article-Marketers-Dont-Mix&id=15624

    I have also pasted the info below.

    How To Disable Microsoft Word’s Smart Quotes:

    1. On the Tools menu, click AutoCorrect Options, then click the AutoFormat As You Type tab.

    2. Under Replace as you type, select or clear the “Straight quotes” with “smart quotes” check box.

    Alternatively, you can copy your entire MS Word document over to a non Microsoft text editor (EditPlus, UltraEdit, TextPad, etc) and do a simple search and replace. Search and replace the smart quotes into standard quotes, apostrophe’s, dashes and dots if applicable.

  52. Takasel Says:

    Anyhow I always write content in MS Word then copy it to Notepad and then transfer it to Wordpress

  53. lyricsofsong Says:

    for my point of view, the best plugin for working with images is ImageManage

  54. Jack Drum Says:

    You can use a different WY editor or just try to turn off the use the visual editor when writing option at pour profile.

  55. Tomelloso Says:

    The latest version of WP resolved some issues with editor problems.

  56. ilan Says:

    I think the latest version of WP has resolved some of the WYSIWYG editor problems. I would agree that blogger is much easier to for the person who doesn’t code.

  57. masaj Says:

    Yes, I agree with tony that 2.6.2 has taken care of those issues. I gotta learn coding, for me wysisyg is a crutch!

  58. ilan Says:

    You can use a different WY editor or just try to turn off the use the visual editor when writing option at pour profile.

  59. teknoloji ve tasarım Says:

    open the instal folder find editor and then comment it
    you can even replace it fck editor its better than word press editor

  60. oyun perisi Says:

    Brenda Quiles, for my point of view, the best plugin for working with images is ImageManager

  61. Msn Nick Says:

    my point of view is number one wordpress i like to wordpress thak you wp :p

  62. Trade Credit Says:

    Great article. I’m new to WP and it’s editor is a bit difficult to use for me. This would help me a bit. Thank you for the awesome post. Appreciate the work.

  63. oyunlar Says:

    for my point of view, the best plugin for working with images is ImageManage

  64. thomas fallen Says:

    I gave up editing online via the wordpress editor. Too many times have I lost a post because of some weird bug or crash. There’s plenty of offline editors around, I use one of those.

  65. Energy Efficient Windows Save Hundreds | Atlanta, GA | WeathertiteWindowsOfAtlanta.com Says:

    [...] I want to take some time right now and give a shout out to someone who has made my life easier by showing me how to make my wordpress text editor less evil. [...]

  66. Web application testing Guru Says:

    Michael Clark, thanks for your link.
    It’s one of the problems I’m facing every day working with my blogs.
    And, you know, it’s always not enough time to knuckle down and search for a proper solution. But today I stumbled upon your post and I’m really lucky having one problem less. Thanks. :)

  67. Mrinmay Bhattacharjee Says:

    Thanks for the writeup and link :)

  68. Kolay Kek Tarifleri Says:

    Nice work. I had old version of Wordpress and always wanted to solve this problem. Thanks.

  69. pherif Says:

    Michael,

    Thanks for the plug in. I also hate the WYSIWYG editor that word press uses. I would much rather hand code everything. I usually keep a copy of each post on my computer with the original code so I can copy and paste it into WP if I need to edit a post and not worry about it getting screwed up.

  70. "NesMedya Haber Video Oyun Seo Yarışması" Says:

    Great article. I’m new to WP and it’s editor is a bit difficult to use for me.

  71. sulumits retsambew Says:

    The latest version of WP resolved some issues with editor problems.

    I am agree with this poster.

  72. Buzz News Says:

    I used to use an offline editor such as ms word before I post an article. But there is a hidden visual editor in wordpress, I saw it on the net. There’s a shortcut and when you press it the visual editor pops up. It would make the job much easier.

  73. wordpress user Says:

    i know about two larger wpmu blog networks where the visual editor is a constant source of uncontrollable errors, which the users themselves cannot see or fix because the code view shows some terrible mixup hiding tags and copy and paste metadata trash. try and send it to the w3c validator. this piece of software sucks badly. the wikipedia editor works much better .

Leave a Reply