Create a to do out of a text

Apple Mail in LeopardI had the idea from the last WWDC keynote where Steve Jobs presented the new Mac OS X “Leopard”. One feature of the new Mail brought my attention.

You can can create a to do out of a text eg. from a mail oder note.

Here a screenshot.

Well i think its a great feature. Often i get mails which contains some tasks. So i select it - push a keystroke and boom i have a to do.Now i wanna try to rebuild this method for the web.First of all i need a javascript method to “surround” the selected text with a span tag.

theSelection = window.getSelection();
theRange = theSelection.getRangeAt(0);
var newNode = document.createElement("span");
newNode.style.background="#ffffe1";
newNode.style.padding="2";
newNode.style.border="1px dashed #cccccc";
theRange.surroundContents(newNode);

Demo

This is the first step. Very simple and only tested on Firefox.

The next steps:

  1. a checkbox in front of the To Do
  2. a nice arrow at the left side ;)
  3. what about a selection of more then one row?
  4. the user cant mark the same text for a new to do. You mark “Buy a nice birthday present in the city” you cant mark “birthday present” as another to do. Makes no sense but you’ll get the point.
  5. after creating the to do a “option box” should appear where i can change priority or due date.

Thats my thoughts about the clicky-wicky-GTD-generator out of mail/note

Leave a Reply