Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-80963

Code block in legacy editor edit mode copying text as a single line

      Problem

      When copying all the text from the code block macro

      • It doesn't maintain the code structure, and when pasting, it becomes a single line, as you have experienced.
      • The code structure shows correctly in edit mode, but when viewing the code, it can be a single line when it's within another macro. 

      Environment

      Confluence Cloud with legacy editor

      Steps to Reproduce

      • Create a legacy page
      • Insert a code block macro
      • Enter multi-line code into the macro
      • Publish the page
      • Edit the page
      • Copy the text from the code block macro 
      • Paste to another application or another page

      Expected Results

      The copied text maintains the multi-line code formatting 

      Actual Results

      The copied text lost code formatting and becomes a single line

      Workaround

      Select and copy the whole code block macro instead of the text within the macro 

      Notes

            [CONFCLOUD-80963] Code block in legacy editor edit mode copying text as a single line

            There are no comments yet on this issue.

              Unassigned Unassigned
              fcb47b51ec9b John Li
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated: