Copying text into a codeblock element

Last Updated : Apr 06, 2015 |

There are instances when you need to copy a block of code into a codeblock element. There are sometimes brackets in the code that prevent you from simply copying the text directly into the codeblock element. The following workaround solves the issue.

Tip:

If the line breaks in the code sample aren’t preserved when you paste into a topic, try pasting the code sample into Notepad and then copy and paste from Notepad into Editor.

Procedure

  1. In the original source, replace the first bracket (<) with another symbol.
  2. Copy the code sample into a codeblock element in a DITA topic.
  3. Replacing the symbol with the start bracket (<).