Saves the current selection in a certain format and sends the result back asynchronously by calling a given callback function.
Type: Number. Specifies one of the StreamType values.
A function with one parameter. Is called with an argument object of type SaveDocumentResult containing the selection content after the selection has been saved successfully.
For an example on how to use this function have a look at the description of the saveDocument function.