The smart paste functionalist preserves certain style and structure information when pasting to certain document types from certain common applications.
For other document types the default behavior of the paste operation is to keep only the text content without the styling but it can be customized by setting an XSLT stylesheet in that document type. The XSLT stylesheet must accept as input an XHTML flavor of the copied content and transform it to the equivalent XML markup that is appropriate for the target document type of the paste operation. The stylesheet is set up by implementing the getImporterStylesheetFileName method of an instance object of the AuthorExternalObjectInsertionHandler class which is returned by the createExternalObjectInsertionHandler method of the ExtensionsBundle instance of the target document type.