History | Edit

The Author editing mode includes a Smart Paste feature that preserves certain style and structure information when copying content and pasting it into document types that support the feature. You can copy content from various sources, including web pages, external applications (such as Office-type applications), or other document types within Oxygen XML Editor, and then paste it into DITA, TEI, DocBook, JATS, and XHTML documents. Oxygen XML Editor preserves the original text styling (such as bold, italics, underline) and formatting (such as lists, tables, paragraphs) and considers various pasting solutions to keep the resulting document valid.

The styles and general layout of the pasted content are converted to the equivalent XML markup for the target document type while preserving certain style and structure information. For example, if you copy content that includes multiple paragraphs and then paste it in Author mode, the multiple paragraph structure is preserved. If you paste the content in a location where the resulting XML would not be valid, Oxygen XML Editor will attempt to place it in a valid location, and may prompt you with one or more choices for where to place it.

Tip: When pasting text fragments formatted with the Courier New font, the Smart Paste mechanism will wrap it in an inline code element (for example, in DITA it would be wrapped in a codeph element).

Smart Paste Options

By default, the Smart Paste feature is enabled in Oxygen XML Editor. There are several options in the Schema Aware preferences page that control the Smart Paste mechanism:
  • Smart paste and drag and drop - This option determines whether or not Oxygen XML Editor will try to find an appropriate insert position when the current location is not valid for the pasted content. This option is selected by default.
  • Reject action when its result is invalid - If you select this option, Oxygen XML Editor will not let you paste content into a position where it would be invalid. This option is deselected by default.
  • Convert external content on paste - This option determines whether or not Oxygen XML Editor will convert the styling and formatting of copied content from external sources when pasting it into a document type that supports the feature. This option is selected by default.
  • Convert even when pasting inside space-preserve elements - If you select this option, the Smart Paste feature will also work when pasting external content into a space-preserve element (such as a codeblock). This option is deselected by default.

Smart Paste Supported Document Types

The Smart Paste feature is supported for the following document types (frameworks):
  • DITA
  • DocBook 4
  • DocBook 5
  • TEI
  • XHTML
  • JATS

For more information about the Smart Paste support, watch our video demonstration: