Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-37196

Pasting Codes from Code Block Macro into a Text Editor Creates Additional Lines

    XMLWordPrintable

Details

    Description

      When multiple lines of codes from Code Block Macro are copied and pasted into a text editor, additional line breaks are added.

      Steps To reproduce

      1. Create a new page.
      2. Add Code Block Macro with a few lines of codes, e.g.:
        public static void main(String[] args)
        {
          System.out.println("Hello World!");
        }
        
      3. Save the page.
      4. Highlight the code and press Ctrl+C to copy code selection to clipboard.
      5. Press Ctrl+V to paste the clipboard contents into the Text Editor.

      Observed Behaviours are attached to this ticket.

      Workaround

      1. Double click on the Code Block Macro to highlight the codes
        Upon double-clicking the code block macro, the code formatting will be disordered. Observed behaviour can be found in CONF-37203.
      2. Press Ctrl+C to copy code selection to clipboard.
      3. Press Ctrl+V to paste the clipboard contents into the Text Editor.

      Besides that, user can opt to another browsers as a workaround, as this issue only occurs in IE.

      Attachments

        1. CodeBlockMacro.png
          CodeBlockMacro.png
          85 kB
        2. ObservedBehaviour1.png
          ObservedBehaviour1.png
          21 kB
        3. ObservedBehaviour2.png
          ObservedBehaviour2.png
          49 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lrura Lauretha Rura
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: