1. A method of annotating a document, comprising: rendering a document on a display using a document rendering system; while the document is being displayed, launching a script editor configured to receive script code, the script editor configured to show to a user syntax errors in connection with a given scripting language and to import already-coded scripts to obtain a user-defined and customizable script; associating the user-defined and customizable script with the document; and calling the user-defined and customizable script such that the document is rendered with an annotation consistent with instructions provided in the user-defined and customizable script, wherein both the document rendering system and a server on which the document is stored are configured to create a context object that is passed to a script language interpreter that runs the user-defined and customizable script, wherein the context object includes, at least, security information associated with the document.