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

            Erik Gui made changes -
            Component/s Original: Macros - Other - Native (1st Party) [ 46332 ]
            Component/s New: Page - Editor - Legacy (TinyMCE) [ 47611 ]
            SET Analytics Bot made changes -
            Support reference count New: 1
            Erik Gui made changes -
            Status Original: Needs Triage [ 10030 ] New: Gathering Impact [ 12072 ]
            John Li made changes -
            Summary Original: Code block in legacy editor edit mode copying text as single line New: Code block in legacy editor edit mode copying text as a single line
            John Li created issue -

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

                Created:
                Updated: