Highlighted

How "Not to Select" line break with triple click?

New Here ,
Jun 09, 2020

Copy link to clipboard

Copied

I have a huge amount of copy-and-paste text with headings, paragraphs and different styles. I'm selecting a line of text with triple click. It works ok but it also selects the invisible line break character at the end of the line. So when i paste new text over the selected one the following text comes at the end of it and i have to hit enter every time to put it back to where it was.

Is there a way "not to select" the line break character with triple click?

 

Using a KB shortcut associated to something "simplistic" like that to select, placing the cursor in text, all the para without the carriage-return! …  😉

 

// by FRIdNGE, Michel Allio [09/06/20]
var ip = app.selection[0].paragraphs[0].insertionPoints;
if ( app.selection[0].paragraphs[0].characters[-1].contents == "\r" ) ip.itemByRange(0,-2).select();
else ip.itemByRange(0,-1).select();

 

(^/)  The Jedi

 

Topics

How to

Views

141

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How "Not to Select" line break with triple click?

New Here ,
Jun 09, 2020

Copy link to clipboard

Copied

I have a huge amount of copy-and-paste text with headings, paragraphs and different styles. I'm selecting a line of text with triple click. It works ok but it also selects the invisible line break character at the end of the line. So when i paste new text over the selected one the following text comes at the end of it and i have to hit enter every time to put it back to where it was.

Is there a way "not to select" the line break character with triple click?

 

Using a KB shortcut associated to something "simplistic" like that to select, placing the cursor in text, all the para without the carriage-return! …  😉

 

// by FRIdNGE, Michel Allio [09/06/20]
var ip = app.selection[0].paragraphs[0].insertionPoints;
if ( app.selection[0].paragraphs[0].characters[-1].contents == "\r" ) ip.itemByRange(0,-2).select();
else ip.itemByRange(0,-1).select();

 

(^/)  The Jedi

 

Topics

How to

Views

142

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Advocate ,
Jun 09, 2020

Copy link to clipboard

Copied

Using a KB shortcut associated to something "simplistic" like that to select, placing the cursor in text, all the para without the carriage-return! …  😉

 

// by FRIdNGE, Michel Allio [09/06/20]
var ip = app.selection[0].paragraphs[0].insertionPoints;
if ( app.selection[0].paragraphs[0].characters[-1].contents == "\r" ) ip.itemByRange(0,-2).select();
else ip.itemByRange(0,-1).select();

 

(^/)  The Jedi

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jun 15, 2020

Copy link to clipboard

Copied

This solution works great!

Thank you 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...