PDA

View Full Version : Chat - Auto combine lines (i.e., remove new lines) when pasting from PDF, etc.



valeros
March 11th, 2019, 04:35
Do this instead of using this extension:
Paste the text in the chat, then <ctrl><a> to select all, then <ctrl><j> and lines are combined

----

Attached extension to automatically combine lines when pasting to chat window using new chat command /nnl (for "No New Lines"). Great for pasting text from a PDF.

In the chat window, type "/nnl " and paste your text with multiple lines. It replaces new line characters with a space.

26667

valeros
March 11th, 2019, 04:37
Also, is there an easier way to do this without using an extension? It was fun to create the extension, but maybe not even needed if there is a better way. Thanks

Moon Wizard
March 11th, 2019, 04:50
I believe that you can use Control+J to force lines to be combined. It works in text fields and formatted text fields; so i think it should work in chat entry field too.

Regards,
JPG

valeros
March 11th, 2019, 04:59
Thanks, I just tried and you can do that. Paste the text in the chat, then <ctrl><a> to select all, then <ctrl><j> and lines are combined.

I guess I should have asked first before creating the extension. Still a good learning experience though.

Thanks for the info.

Kelrugem
March 12th, 2019, 07:27
I believe that you can use Control+J to force lines to be combined. It works in text fields and formatted text fields; so i think it should work in chat entry field too.

Regards,
JPG

Wow, thank you both :) This is exactly what I needed, I always formatted it by hand since I didn't know that there is a hotkey for it :D Didn't see it in the hotkeys for the text stuff :D

Zacchaeus
March 12th, 2019, 10:04
Also, is there an easier way to do this without using an extension? It was fun to create the extension, but maybe not even needed if there is a better way. Thanks
I generally paste from pdf into notepad++ and do al the reformatting there before copy pasting that into my stories. This would be if I wanted it all nice and neat with no double spaces and weird character combinations. If I don’t want it pretty I just copy into story and do ctrl+j to get rid of the excess line bepreaks.

Trenloe
March 12th, 2019, 15:59
FYI - the hotkeys available in a formatted text field are listed here: https://www.fantasygrounds.com/wiki/index.php/The_Basics#Formatted_Text_Fields

Kelrugem
March 12th, 2019, 20:56
FYI - the hotkeys available in a formatted text field are listed here: https://www.fantasygrounds.com/wiki/index.php/The_Basics#Formatted_Text_Fields

Aaah, thank you :) I somehow didn't see that :)