Hello everyone,
in my help file i sometimes add some lines of code which i want to be able to copy and paste.
The problem here is that after pasting the copied code an empty line will be added between every line.
For example if i copy the following:
This is
my code
which i
want to copy.
it will look like this after pasting:
This is
my code
which i
want to copy.
Is there any way to prevent the empty lines of being added when copying something from my WebHelp?
Thanks in advance!
WebHelp - Copying text adds empty lines
Moderators: Alexander Halser, Tim Green
-
- Posts: 10
- Joined: Wed Feb 14, 2018 10:35 am
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: WebHelp - Copying text adds empty lines
Hi Simon,
Use CTRL+SHIFT+V to paste. That will paste only the plain text and not the formatting as well. It's a fairly standard shortcut in Windows that works in a lot of programs, not just Help+Manual.
Use CTRL+SHIFT+V to paste. That will paste only the plain text and not the formatting as well. It's a fairly standard shortcut in Windows that works in a lot of programs, not just Help+Manual.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 10
- Joined: Wed Feb 14, 2018 10:35 am
Re: WebHelp - Copying text adds empty lines
Good morning Tim,
i tried pasting my text via CTRL + SHIFT + V but somehow it doesn't work. Right clicking and selecting "paste as plain text" doesn't work for me either
There is no other way to do this, is there?
i tried pasting my text via CTRL + SHIFT + V but somehow it doesn't work. Right clicking and selecting "paste as plain text" doesn't work for me either
There is no other way to do this, is there?
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: WebHelp - Copying text adds empty lines
Hi Simon,
It is working, but what you're getting is simply the paragraphs that are there in your WebHelp. If there were empty paragraphs in WebHelp they will get copied, and if your standard paragraphs in your project have space before and/or after them you will get that when pasting as plain text. That can't be changed -- you would need to automatically convert carriage returns and line feeds to spaces, or even delete them, and copy/paste doesn't do that.
It is working, but what you're getting is simply the paragraphs that are there in your WebHelp. If there were empty paragraphs in WebHelp they will get copied, and if your standard paragraphs in your project have space before and/or after them you will get that when pasting as plain text. That can't be changed -- you would need to automatically convert carriage returns and line feeds to spaces, or even delete them, and copy/paste doesn't do that.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 206
- Joined: Thu Jul 13, 2017 2:57 pm
Re: WebHelp - Copying text adds empty lines
Are you copying from H&M's editor or from its published webhelp output? What are you pasting into?Simon Heller wrote:in my help file i sometimes add some lines of code which i want to be able to copy and paste.
The problem here is that after pasting the copied code an empty line will be added between every line.
Is there any way to prevent the empty lines of being added when copying something from my WebHelp?
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: WebHelp - Copying text adds empty lines
Hi Simon,Simon_Dismore wrote:Are you copying from H&M's editor or from its published webhelp output? What are you pasting into?
He is copying text from a web page in a browser into H&M's RVF editor. I have been there myself.
There is no way to paste a newline (Shift+Return keys in the editor) into the RVF editor. You always get a new para instead. This applies regardless of the EOL - it can be CR, CRLF or LF if pasting plain text, or <br> if pasting HTML. The result is always a new paragraph.
I would have added this to the Wish List years ago, but it is in the RVF editor, not H&M, so it's not likely Alex or Tim can do much about it. (As with the missing Overwrite function. )
Well there is one way, of course - copy and paste from some other RVF editor (I use the RVF editor in my own apps). But there aren't many others around, since the demise of GemX - there's a list at: https://www.trichview.com/applications/
cheers,
Martin.
Re: WebHelp - Copying text adds empty lines
I'm not 100% sure what you want, and I may be completely missing the real problem, but you can get rid of paragraphs quickly enough, as follows:
Download Notepad++ (https://notepad-plus-plus.org/download/v7.5.6.html)
Copy your HTML text
Paste into Notepad++
Go to Search > Replace...
In the Search Mode bit select Regular expression
In Find what: type ^\s*
Make sure Replace with: is blank
Click Replace All
Copy and paste to wherever.
Download Notepad++ (https://notepad-plus-plus.org/download/v7.5.6.html)
Copy your HTML text
Paste into Notepad++
Go to Search > Replace...
In the Search Mode bit select Regular expression
In Find what: type ^\s*
Make sure Replace with: is blank
Click Replace All
Copy and paste to wherever.