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

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      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.

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

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

              Created:
              Updated:
              Resolved: