10 Replies Latest reply: Sep 9, 2013 11:57 AM by Dude! RSS

    Copy of text results in double line spacing.


      Copying of text shown in the code examples at https://forums.oracle.com/thread/2304774 result in extra empty lines, or double line spacing, when pasting the text into another editor or Terminal application. It makes copying and pasting of code examples very difficult or nearly impossible.


      You can even copy this text to test. If I copy and paste the information between Firefox and TextEdit I have 3 empty lines between each paragraphs. Can this please be fixed?


      Please see the following example:



      Btw, I previously mentioned such issue, trying to provide a more technical background. I think this is a nasty problem due to the way the new forum software processes or presents text in regard to filtering empty lines or inserting paragraph markers, which is not compatible with standard text processing systems.




      Could you please unlock Oracle SQL Developer 3.x on Linux Ubuntu 11.10 how-to, so I can make some changes to correct the issue? Thanks.

        • 1. Re: Copy of text results in double line spacing.

          Apparently the problem is also affected by the browser. I get empty lines when using Firefox v22.0, whereas Safari on the Mac does not have this issue. However, there is still the fixed white-space character between paragraphs.

          • 2. Re: Copy of text results in double line spacing.

            I agree, it's annoying to copy someones code, that looks fine on the forum, into my own editor to find it's got blank lines between every line, and I then have to delete all those blank lines to get the code working.

            It's also annoying when someone has used the Syntax Highlighting option that puts line numbers against the code.  Whilst I like seeing the line numbers and they make a useful reference so we can say "you have an issue on line 15" etc. if you try and copy/paste the code, you end up with all the line numbers in your own editor and have to remove them before you can get anything working.

            • 3. Re: Copy of text results in double line spacing.

              I'm not a fan of the line numbers when using Syntax Highlighting either. Although you should not be able to even select and copy the line numbers, but then again it depends on your browser. For instance, it works in Firefox, but not in Safari.


              However, I'm having major trouble re-editing text under Syntax Highlighting, because the input mask does not match the text, and last not least it swallows empty lines and uses a proportional font. It's a code editor for Sunday drivers.



              I found a solution to avoid the double-line spacing issue with cut and paste in Firefox and corrected my posting. It also allows to create extra empty lines when posting text as seen above.


              Using <Shift><Return> instead of <Return> when creating the content fixes the problem.


              Then when copying and pasting text, it no longer adds an extra blank line between each line of text, or swallows empty lines in the posting. It works in Safari and Firefox. Perhaps soft-returns should be the default.


              I did not search if there is any documentation about it, but it's what I'm used to do in Word to insert a so called soft-return, and it seems to work for this editor too, for now.

              • 4. Re: Copy of text results in double line spacing.

                All the effort you do here, it's all your credit.

                I'm really amazed by the amount of time spent by end users (aren't we?) to manage the use of that editor whereas it should be done from the backend side.

                Without saying that on every bug fixes, patches or whatever, the software behavior will change unexpectedly dropping most of the effort down.

                On my side I found a solution, probably nasty : reducing dramatically the use of the code, or if required, not using format in any way.



                • 5. Re: Copy of text results in double line spacing.

                  That's right. Problem is one does not always realize the implications beforehand. The editor looks very promising, but lacks compatibility and proper function. And it takes a while to realize that the problem is not the person using the keyboard. Considering that Jive is a major player in the collaboration software business, and many large installations rely on it, the editor is completely moron.

                  • 6. Re: Copy of text results in double line spacing.

                    As you're a fan of using the HTML side of the editor, and as per your example thread you posted above, you could alter that slightly so the HTML differs and all the text is in a single cell of a table for posting code...


                    SQL*Plus (Oracle v11.2.0.3)

                    SQL> ed
                    Wrote file afiedt.buf

                      1  select empno, ename, job, mgr, hiredate, sal, comm, deptno
                      2        ,round(months_between(sysdate, hiredate)/12) as yrs_employed
                      3* from emp
                    SQL> /

                         EMPNO ENAME      JOB              MGR HIREDATE                    SAL       COMM     DEPTNO YRS_EMPLOYED
                    ---------- ---------- --------- ---------- -------------------- ---------- ---------- ---------- ------------
                          7369 SMITH      CLERK           7902 17-DEC-1980 00:00:00        800                    20        33
                          7499 ALLEN      SALESMAN        7698 20-FEB-1981 00:00:00       1600        300         30        33
                          7521 WARD       SALESMAN        7698 22-FEB-1981 00:00:00       1250        500         30        33
                          7566 JONES      MANAGER         7839 02-APR-1981 00:00:00       2975                    20        32
                          7654 MARTIN     SALESMAN        7698 28-SEP-1981 00:00:00       1250       1400         30        32
                          7698 BLAKE      MANAGER         7839 01-MAY-1981 00:00:00       2850                    30        32
                          7782 CLARK      MANAGER         7839 09-JUN-1981 00:00:00       2450                    10        32
                          7788 SCOTT      ANALYST         7566 19-APR-1987 00:00:00       3000                    20        26
                          7839 KING       PRESIDENT            17-NOV-1981 00:00:00       5000                    10        32
                          7844 TURNER     SALESMAN        7698 08-SEP-1981 00:00:00       1500          0         30        32
                          7876 ADAMS      CLERK           7788 23-MAY-1987 00:00:00       1100                    20        26
                          7900 JAMES      CLERK           7698 03-DEC-1981 00:00:00        950                    30        32
                          7902 FORD       ANALYST         7566 03-DEC-1981 00:00:00       3000                    20        32
                          7934 MILLER     CLERK           7782 23-JAN-1982 00:00:00       1300                    10        32

                    14 rows selected.



                    Then if someone copy/pastes the contents of that into their editor, it doesn't have the double line spacing.

                    (To be honest I quite like that format, I might knock up a quick function to transform my code/output into the necessary HTML for when I want to post it)

                    • 7. Re: Copy of text results in double line spacing.

                      I use HTML because it allows me to use the same format for posting and archiving of material, at least theoretically. The code and format tags used in the previous forum software was too proprietary and too much effort for archiving and maintaining copies offline.



                      However, I'm not really a fan or expert of HTML, and up until now I was not really aware of the compatibility issues that seem to exist between browsers and various standards in rendering simple text. I guess it is for that reason that the editor parses and rebuilds text to provide a certain standard, which is perhaps obsolete and doing more harm than good.



                      The forum editor does a lot of processing behind the scene. On of the most annoying features, I think, is the automatic converting of text to tables, or rebuilding of rich text when copying HTML. I think the editor is over-engineered to a point where it has become useless and unpredictable.



                      Anyway, my general experience with the forum is that it might be time to move on.



                      Regarding your table or code example, what is the difference? Isn't it the same I was using? I was also pasting text into a single table cell. However, depending on the browser, copying the information out of the forum produces empty lines. It's probably the HTML nbsp character, which the editor added. As far as I can tell, using Shfit-Return solves the problem.



                      I would actually not use white text on black background anymore, because copying the text into a rich text editor will retain the white text color.

                      • 8. Re: Copy of text results in double line spacing.

                        My mistake, I'm sure when I copied text out of your "Terminal" on that other thread yesterday into notepad it gave me double line spacing, but today it doesn't seem to.  Ok, so ignore me. 


                        If I'm copying code etc. from the forum, I'd typically paste into notepad or some other dumb editor, rather than rich text, so I don't really have an issue with that. 

                        • 9. Re: Copy of text results in double line spacing.

                          Perhaps you tried before I finished replacing line endings with Shift-Return, which I fixed yesterday.

                          • 10. Re: Copy of text results in double line spacing.

                            Here are two examples, in case anybody wants to test their browser.


                            Example 1 uses normal line endings.


                            Terminal - Example 1

                            The orange frog jumps over the blue dog

                            to escape from the yellow cat.

                            Copy and paste text into a text editor to check.


                            Example 2 uses Shift-Return.


                            Terminal - Example 2

                            The orange frog jumps over the blue dog
                            to escape from the yellow cat.
                            Copy and paste text into a text editor to check.




                            Although both tables look identical, a copy and paste of the text in Example 1 produces different results, depending on the browser.


                            Firefox (vers. 22.0):


                            The orange frog jumps over the blue dog

                            to escape from the yellow cat.

                            Copy and paste text into a text editor to check.



                            Safari (5.1.9):


                            The orange frog jumps over the blue dog
                            to escape from the yellow cat.
                            Copy and paste text into a text editor to check.

                            Example 2, which was created using Shift-Return, does not experience this issue and copies lines as seen, regardless of the browser.


                            Example 1 uses HTML <p> tags, whereas Example 2 uses <br> tags. Apparently, most browsers (correctly) interpret paragraphs with one blank line between them when using <p> tags. The <br> tag is simply a forced line break.


                            Why this issue only seems to manifest when using copy and paste and does not affect the display of the page, I don't know.