1. A method implemented in a data processing system for processing a document, the method comprising: receiving an electronic version of a document comprising a plurality of content portions; storing code for executing a plurality of tasks operating on individual content portions of the document; generating an editing copy of the document, the generating comprising embedding code in the editing copy of the document, the code identifying at least one task corresponding to at least one content portion of the document, the code defining at least one user interface element for presentation proximate to the at least one content portion and within the editing copy when the editing copy is rendered and presented; transmitting, to a user system, the editing copy of the document including the embedded code for rendering and presentation by the user system; receiving, from the user system, a request to execute a task identified by embedded code, the request having been initiated by activation of one of the at least one user interface element identifying the task; executing the task for the corresponding content portion by executing the code stored for the task; and transmitting a result of the task to the user system for presentation within the editing copy at the user system.