WebHelp - Copying text adds empty lines

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

Moderators: Alexander Halser, Tim Green

WebHelp - Copying text adds empty lines

Unread postby Simon Heller » Wed May 02, 2018 1:54 pm

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

Re: WebHelp - Copying text adds empty lines

Unread postby Tim Green » Thu May 03, 2018 6:30 am

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

Re: WebHelp - Copying text adds empty lines

Unread postby Simon Heller » Thu May 03, 2018 8:30 am

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

Re: WebHelp - Copying text adds empty lines

Unread postby Tim Green » Thu May 03, 2018 8:34 am

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

Re: WebHelp - Copying text adds empty lines

Unread postby Simon_Dismore » Thu May 03, 2018 11:03 am

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

Re: WebHelp - Copying text adds empty lines

Unread postby Martin Wynne » Thu May 03, 2018 11:25 am

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.
User avatar
Martin Wynne
 
Posts: 2365
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: WebHelp - Copying text adds empty lines

Unread postby Ga Bowen » Thu May 03, 2018 12:55 pm

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


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 3 guests