Add selected task to the document