“Paste” Behavior in XMetaL Author

XMetaL Author is an XML editor with a user interface resembling a word processor. One of its usability issues was that copying and pasting text didn’t always work the usual way. Users would cut or copy some content, and then when they pasted it sometimes nothing would happen because the content was invalid (according to the rules of the document’s XML schema) at the new location.

I was able to solve the issue in some implementations of the product. I designed a “Smart Paste” algorithm to ensure that pasting either yielded a reasonable result or, if all else failed, at least a meaningful error message. Smart Paste is an example of a widgetless feature, one that adds value to a product but does not take up space or add to on-screen clutter. Interactive systems should provide reasonable responses to reasonable user actions.

Here is an outline of the Smart Paste algorithm:

  1. If the content to be pasted is a single element and matches the type of the current element, strip the tags from the content to be pasted.
  2. If the cursor is next to a tag, or next to white space next to a tag,  jump over tags to paste.
  3. Ask the user if it’s OK to split the current element to insert the new one.
  4. Display an error message if all else fails.

Comments are closed, but trackbacks and pingbacks are open.