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: wordpress, editor, wysiwyg, quotes, code, usability, source code
December 20th, 2008 at 19:19 (GMT-1)
Anyhow I always write content in MS Word then copy it to Notepad and then transfer it to WordPress
December 20th, 2008 at 20:15 (GMT-1)
for my point of view, the best plugin for working with images is ImageManage
December 22nd, 2008 at 12:46 (GMT-1)
You can use a different WY editor or just try to turn off the use the visual editor when writing option at pour profile.
January 7th, 2009 at 23:01 (GMT-1)
The latest version of WP resolved some issues with editor problems.
January 15th, 2009 at 13:35 (GMT-1)
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.
January 15th, 2009 at 13:36 (GMT-1)
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!
January 24th, 2009 at 22:38 (GMT-1)
Brenda Quiles, for my point of view, the best plugin for working with images is ImageManager
January 29th, 2009 at 19:21 (GMT-1)
my point of view is number one wordpress i like to wordpress thak you wp :p
January 30th, 2009 at 05:28 (GMT-1)
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.
January 30th, 2009 at 11:43 (GMT-1)
for my point of view, the best plugin for working with images is ImageManage
February 8th, 2009 at 05:11 (GMT-1)
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.
February 20th, 2009 at 13:29 (GMT-1)
[…] 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. […]
February 24th, 2009 at 14:22 (GMT-1)
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. :)
March 12th, 2009 at 17:42 (GMT-1)
Thanks for the writeup and link :)
March 17th, 2009 at 20:19 (GMT-1)
Nice work. I had old version of WordPress and always wanted to solve this problem. Thanks.
March 17th, 2009 at 22:38 (GMT-1)
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.
June 14th, 2009 at 23:23 (GMT-1)
Great article. I’m new to WP and it’s editor is a bit difficult to use for me.
June 16th, 2009 at 10:31 (GMT-1)
The latest version of WP resolved some issues with editor problems.
I am agree with this poster.
June 21st, 2009 at 13:20 (GMT-1)
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.
July 4th, 2009 at 02:34 (GMT-1)
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 .