WebHelp - Copying text adds empty lines

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Simon Heller
Posts: 10
Joined: Wed Feb 14, 2018 10:35 am

WebHelp - Copying text adds empty lines

Unread post by Simon Heller »

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!
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: WebHelp - Copying text adds empty lines

Unread post by Tim Green »

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. :)
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.
Simon Heller
Posts: 10
Joined: Wed Feb 14, 2018 10:35 am

Re: WebHelp - Copying text adds empty lines

Unread post by Simon Heller »

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?
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: WebHelp - Copying text adds empty lines

Unread post by Tim Green »

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.
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.
Simon_Dismore
Posts: 205
Joined: Thu Jul 13, 2017 2:57 pm

Re: WebHelp - Copying text adds empty lines

Unread post by Simon_Dismore »

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?
Are you copying from H&M's editor or from its published webhelp output? What are you pasting into?
User avatar
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

Unread post by Martin Wynne »

Simon_Dismore wrote:Are you copying from H&M's editor or from its published webhelp output? What are you pasting into?
Hi Simon,

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.
Ga Bowen
Posts: 324
Joined: Mon Jun 27, 2016 5:05 pm

Re: WebHelp - Copying text adds empty lines

Unread post by Ga Bowen »

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.
Post Reply