Jump to content

Spacing using copy-paste

Hello,

 

So I usually write my tutorials in an external document (not on the site) and when I try to copy+paste the spacing is all messed up.

I hope the devs/admins/mods/anyone in charge for this could fix this?

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

maybe a spam prevention tactic

Favorite Threads: PSU Tier List

 

My Stuff n' Things

Spoiler

The Beast (My Rig)   |CPU: AMD Ryzen 9 3900X|  |Cooling: Enermax Liquimax III, 6x 120mm Noctua Redux|  |Motherboard:  MSI MPG B550 Gaming Plus|  |RAM: 4x32gb 3200 G.Skill TridentZ NEO|  |Graphics Card: EVGA(RIP) GeForce RTX 3070TI FTW3|  |Power Supply: Corsair CX-M 750W|  |Case: Corsair 4000D Airflow Mid Tower Case(Black)|  |SSD: 1Tb WD BLACK NVMe, 500gb NVMe, 1Tb Samsung 850 EVO|  |Monitor: MSI Optix MPG341QR 34" Ultrawide|  |Keyboard: Logitech G815|  |Mouse: Logitech G203 LIGHTSYNC|  |Audio Interface: FiiO K7 DAC/Amp|  |Headphones: Sennheiser HD6XX |Webcam: Logitech C920, Logitech C270|

 

My Network Rack  |Switch: Cisco Dell PowerConnect 5548P|  |Router: Unifi USG|  |Rack: 12U|  |Server: HP Z420|  |Services: Proxmox PVE, Wireguard, Pihole, NVR, NAS|

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, MrMcMuffinJr said:

maybe a spam prevention tactic

It still is a pain to manually add alot of spaces

Link to comment
Share on other sites

Link to post
Share on other sites

That's not something they can probably just fix. It depends on where you wrote the original piece on. If it's something like Word... Yeah, good luck preserving that.

 

There's kind of a rule in software development: always develop on your target platform as much as possible or something that is a very good substitute. The reason being if you develop on another platform, you can't expect everything to work as you want.

 

The same goes for something like this. If you need to save your work or something for this forum, there's a scratchpad forum on the bottom of the listing that only you (and the mods) have visible access to.

Link to comment
Share on other sites

Link to post
Share on other sites

What do you mean by spacing?  Line spacing?  What are you using to write them?  Did you remember to clear formatting when you paste?

Solve your own audio issues  |  First Steps with RPi 3  |  Humidity & Condensation  |  Sleep & Hibernation  |  Overclocking RAM  |  Making Backups  |  Displays  |  4K / 8K / 16K / etc.  |  Do I need 80+ Platinum?

If you can read this you're using the wrong theme.  You can change it at the bottom.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Ryan_Vickers said:

What do you mean by spacing?  Line spacing?  What are you using to write them?  Did you remember to clear formatting when you paste?

I use TextWrangler, but that's not the problem, I tried different programs.

Yes, Line spacing and here is a little example what happens:

 

Original Message (written somewhere else)

I am trying to copy paste

on the LTT forum.

 

After copy+paste

i am trying to copy paste this message on the LTT forum!

 

As you can see, it's one line.

Ofcourse this might now be a problem for my example, but when you're copy pasting huge posts it's annoying.

Link to comment
Share on other sites

Link to post
Share on other sites

In HTML only the first space character has a fixed width. If there's multiple space characters one after another, the width doesn't multiply by the number of space characters, the browser isn't even required to treat them as multiple spaces.

 

If you want to have a fixed width space, you use the html code    which is short for "non-breaking space" which explains the true purpose of this code: if you use a single   between two words, the browser is not allowed to split a long sentence between those words (useful when wrapping long paragraphs in a page with dynamic width)

 

So basically, what you could do would be to paste the code in Notepad, then do a search and replace for two spaces and replace with one space and   and hope that when you paste the new text, the code behind the form will accept the   sequence and not replace it with regular space character.

 

An alternative would be to use a mono-spaced font where each character has the same width and maybe use html tags like  <pre>  </pre> which means anything between these tags won't be formatted by the browser in any way, it means the text is pre-formatted in some way. But again, the code on the website will most likely filter the tags and may remove the pre tags.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, M.Yurizaki said:

That's not something they can probably just fix. It depends on where you wrote the original piece on. If it's something like Word... Yeah, good luck preserving that.

 

There's kind of a rule in software development: always develop on your target platform as much as possible or something that is a very good substitute. The reason being if you develop on another platform, you can't expect everything to work as you want.

 

The same goes for something like this. If you need to save your work or something for this forum, there's a scratchpad forum on the bottom of the listing that only you (and the mods) have visible access to.

Well, it doesn't matter where I write this.

I tried copy pasting it from TextWrangler to YT comment section to Eclipse, nothing worked.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, ZUB xD said:

I use TextWrangler, but that's not the problem, I tried different programs.

Yes, Line spacing and here is a little example what happens:

 

Original Message (written somewhere else)

I am trying to copy paste

on the LTT forum.

 

After copy+paste

i am trying to copy paste this message on the LTT forum!

 

As you can see, it's one line.

Ofcourse this might now be a problem for my example, but when you're copy pasting huge posts it's annoying.

Oh interesting, I have never seen that happen.  You wouldn't happen to be using something other than Windows would you?

Solve your own audio issues  |  First Steps with RPi 3  |  Humidity & Condensation  |  Sleep & Hibernation  |  Overclocking RAM  |  Making Backups  |  Displays  |  4K / 8K / 16K / etc.  |  Do I need 80+ Platinum?

If you can read this you're using the wrong theme.  You can change it at the bottom.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, mariushm said:

In HTML only the first space character has a fixed width. If there's multiple space characters one after another, the width doesn't multiply by the number of space characters, the browser isn't even required to treat them as multiple spaces.

 

If you want to have a fixed width space, you use the html code &nbsp;  which is short for "non-breaking space" which explains the true purpose of this code: if you use a single &nbsp; between two words, the browser is not allowed to split a long sentence between those words (useful when wrapping long paragraphs in a page with dynamic width)

 

So basically, what you could would be to paste the code in Notepad, then do a search and replace for two spaces and replace with space and &nbsp; and hope that when you paste the new text, the code behind the form will accept the &nbsp; sequence and not replace it with regular space character.

 

An alternative would be to use a mono-spaced font where each character has the same width and maybe use html tags like  <pre>  </pre> which means anything between these tags won't be formatted by the browser in any way, it means the text is pre-formatted in some way. But again, the code on the website will most likely filter the tags and may remove the pre tags.

 

 

Interesting, I'll try this for now, thank you!

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Ryan_Vickers said:

Oh interesting, I have never seen that happen.  You wouldn't happen to be using something other than Windows would you?

I am using Mac right now but I used multiple programs and even word...

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, ZUB xD said:

I am using Mac right now but I used multiple programs and even word...

I wonder if there's a chance this is due to the Unix line ending vs Windows line ending differences... (you'll know what I mean if you've ever opened a text file made on mac or Linux with Windows)

Solve your own audio issues  |  First Steps with RPi 3  |  Humidity & Condensation  |  Sleep & Hibernation  |  Overclocking RAM  |  Making Backups  |  Displays  |  4K / 8K / 16K / etc.  |  Do I need 80+ Platinum?

If you can read this you're using the wrong theme.  You can change it at the bottom.

Link to comment
Share on other sites

Link to post
Share on other sites

btw, I'm going to move this topic into the Bugs section in case it is an issue with the forum, and that way it will also get some notice from our expert @colonel_mortis:)

Solve your own audio issues  |  First Steps with RPi 3  |  Humidity & Condensation  |  Sleep & Hibernation  |  Overclocking RAM  |  Making Backups  |  Displays  |  4K / 8K / 16K / etc.  |  Do I need 80+ Platinum?

If you can read this you're using the wrong theme.  You can change it at the bottom.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Ryan_Vickers said:

I wonder if there's a chance this is due to the Unix line ending vs Windows line ending differences... (you'll know what I mean if you've ever opened a text file made on mac or Linux with Windows)

Maybe.. Could you try it on this comment section? (you dont have to post the comment, just paste it in the bar)

 

Try and copy paste this:

 

copy paste

test

 

If it comes out like "copy paste test" it's universal, otherwise only mac I think

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Ryan_Vickers said:

btw, I'm going to move this topic into the Bugs section in case it is an issue with the forum, and that way it will also get some notice from our expert @colonel_mortis:)

I'm sorry, I didn't see the bugs section 

Link to comment
Share on other sites

Link to post
Share on other sites

38 minutes ago, ZUB xD said:

Well, it doesn't matter where I write this.

I tried copy pasting it from TextWrangler to YT comment section to Eclipse, nothing worked.

Does that mean the line breaks are stripped out when you paste into YT/Eclipse too? That sounds very much out of our control.

Line breaks aren't removed for me running Firefox on Linux, copying from LibreOffice and Terminal (and every program that I've ever used it on before, they are just the ones that I verified it with just now).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

36 minutes ago, colonel_mortis said:

Does that mean the line breaks are stripped out when you paste into YT/Eclipse too? That sounds very much out of our control.

Line breaks aren't removed for me running Firefox on Linux, copying from LibreOffice and Terminal (and every program that I've ever used it on before, they are just the ones that I verified it with just now).

No, just when I paste on LTT forums.

When I paste it anywhere it's fine, but here it's broken

 

edit: I use macOS and Chrome

Link to comment
Share on other sites

Link to post
Share on other sites

27 minutes ago, ZUB xD said:

No, just when I paste on LTT forums.

When I paste it anywhere it's fine, but here it's broken

If you copy and paste this post,

  • Does it keep the line breaks?
  • Is the formatting (bullet points, bold, colour, etc) retained?
  • Do you get a banner at the bottom of the editor asking you whether you want to remove the formatting?
    • If so, what happens if you click it?

Are the line breaks retained if you paste into the editor at http://ckeditor.com/features?

What about if you click into this box, and paste there?

(you'll need to do that in my post rather than in the version that you copy into the editor).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, colonel_mortis said:

If you copy and paste this post,

  • Does it keep the line breaks?
  • Is the formatting (bullet points, bold, colour, etc) retained?
  • Do you get a banner at the bottom of the editor asking you whether you want to remove the formatting?
    • If so, what happens if you click it?

Are the line breaks retained if you paste into the editor at http://ckeditor.com/features?

What about if you click into this box, and paste there?

Paste here!

(you'll need to do that in my post rather than in the version that you copy into the editor).

Interesting,

I can copy and paste your messages with no problem.

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, ZUB xD said:

Interesting,

I can copy and paste your messages with no problem.

Which of the bullet points are met if you paste something else, where the line breaks do get broken, into the editor (and into the ckeditor link and into the editor box that I included in the post)? Microsoft word is a good test because there is formatting that you can test with, but I am also interested in the behaviour when there is no formatting, just line breaks.

(Please refresh the page if you loaded this post inline, because I have modified my inline editor).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, colonel_mortis said:

Which of the bullet points are met if you paste something else, where the line breaks do get broken, into the editor (and into the ckeditor link and into the editor box that I included in the post)? Microsoft word is a good test because there is formatting that you can test with, but I am also interested in the behaviour when there is no formatting, just line breaks.

(Please refresh the page if you loaded this post inline, because I have modified my inline editor).

I copy pasted your bullet points on CKEditor, it worked fine.

But back to the original problem, I still can't copy paste anything from anywhere.

About the CKEditor thingy, I have no idea what you wanted me to do? It works fine on there but just not on the forum (for me).

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, ZUB xD said:

I copy pasted your bullet points on CKEditor, it worked fine.

But back to the original problem, I still can't copy paste anything from anywhere.

About the CKEditor thingy, I have no idea what you wanted me to do? It works fine on there but just not on the forum (for me).

If I understand you correctly:

  • Copying from the forum to the editor on the forum works as expected, with line breaks and formatting retained
  • Copying from the forum to http://ckeditor.com/features works as expected, with line breaks and formatting retained
  • You haven't tried copying from the forum to the box in my post above
  • Copying from an external program to the forum removes line breaks (but you haven't tested it with formatted content, such as from Microsoft Word)
  • Copying from an external program to http://ckeditor.com/features works as expected, with line breaks and formatting retained (this is important, please make sure this is right!)
  • You haven't tried copying from an external program to the box in my post above.

Can you test the cases that you haven't already, and correct me on anything that I have misunderstood.

 

Also, what browser are you using?

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, colonel_mortis said:

If I understand you correctly:

  • Copying from the forum to the editor on the forum works as expected, with line breaks and formatting retained
  • Copying from the forum to http://ckeditor.com/features works as expected, with line breaks and formatting retained
  • You haven't tried copying from the forum to the box in my post above
  • Copying from an external program to the forum removes line breaks (but you haven't tested it with formatted content, such as from Microsoft Word)
  • Copying from an external program to http://ckeditor.com/features works as expected, with line breaks and formatting retained (this is important, please make sure this is right!)
  • You haven't tried copying from an external program to the box in my post above.

Can you test the cases that you haven't already, and correct me on anything that I have misunderstood.

 

Also, what browser are you using?

Yes

Yes

I have tried copying to your box above, worked fine.

Indeed

That is right.

I have, it worked fine.

 

I am using Google Chrome.

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, ZUB xD said:

Yes

Yes

I have tried copying to your box above, worked fine.

Indeed

That is right.

I have, it worked fine.

 

I am using Google Chrome.

 

I can't reproduce this. In my MacOS Sierra VM, line breaks are retained when copying from TextWrangler 5.5.2 to Chrome 58.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

58 minutes ago, colonel_mortis said:

I can't reproduce this. In my MacOS Sierra VM, line breaks are retained when copying from TextWrangler 5.5.2 to Chrome 58.

Weird.. I'll make a video on it later. (to show)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×