Create Topic

WP Tavern Forums Create Topic

Create New Topic

Andy Skelton

The TinyMCE/WordPress integration was my responsibility for the two years or so before it was Andrew’s. When he took it over it made me a very happy man.

The hardest part of the task is not the coding or even dealing with browser differences. What is difficult is making decisions about how the editor should behave in each of the innumerable ways it will be used. People don’t agree on what the editor should do in all situations. Someone will complain, no matter what.

For example, when someone types some HTML in the RTE and they see it displayed instead of interpreted, they send in a bug report because they expected the editor to know what they wanted. It’s not obvious to everyone, but this would be a horrible way for the visual editor to behave. I created the tabbed editor to make it easier to edit the HTML directly, but this complaint just kept coming in. I mentally created a category for this kind of bug—expectation fault—and it made sorting through bug reports much easier.

The expectation fault appears nowhere more frequently than in the editor. You mentioned blockquote and Andrew explained the current behavior. If you paste text in blockquote mode, your cursor will be at the end of the last paragraph. The editor has received no indication that you’re done with blockquote mode, so when you press Enter it starts a new paragraph in that mode. It always seemed correct to me. You would not have minded the current behavior if you were typing or pasting multiple paragraphs in blockquote mode. You never would have noticed it because your inputs would not have produced unexpected results.

I used to complain that I couldn’t write software that could read minds, thus the editor was doomed to fail in everyone’s eyes at least some of the time. To the programmer, it’s the intended result and not a malfunction. Thus it’s definitely not a bug, and at worst a suboptimal design decision. To the user, it’s a bug. Usually this comes down to someone not realizing that the program acted in the way the programmer saw best, given its state and the user’s actions. Editor state is always displayed via the button shading, the cursor position, and the status line. Usually the user does not understand the editor state, which is by nature complex.

Andrew is doing a very good job maintaining, upgrading, and improving the TinyMCE integration in WordPress. There may be (probably are) better editors out there, but editor integration is extremely sensitive and time-consuming. It’s not likely to be removed or replaced because the majority of users depend on it. Although it frustrates us sometimes, we should remember that we always have the option of editing the HTML directly… and most of us pick the RTE anyway.






Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.