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.paragraphs.insertionPoints; if ( app.selection.paragraphs.characters[-1].contents == "\r" ) ip.itemByRange(0,-2).select(); else ip.itemByRange(0,-1).select();
(^/) The Jedi
This solution works great!
Thank you 🙂
Hey there, sorry in advance for the dumb question. Where do enter this magical bit of code? I'd love to be able to triple click without selecting the paragraph break at the end of the line. Thanks.
Hi! Not a dumb question at all 🙂
Hey, thanks so much for the reply. For some reason my .jsx file is not showing up in the Keyboard Shortcuts pane? I can see the .jsx files that appear above and below it in the finder view, but not the one I created.
Did you try to restart InDesign, i forgot to mention that.
I tried re-pasting the code and made sure it was identical, but still no dice? I used the same naming convention as the other script files as well?
Make sure the code is set as plain text—you might have to specify plain text in your text editor. For example in Apple’s Text Editor, select the text and choose Make Plain text under the Format menu:
Great script, thank you! Would it be possible to make two scripts. One for selecting the paragraph hand copying the text and one for selecting the paragraph and paste it as plain text? So you could use two shortcuts to copy and paste. I tried to do it myself but im too bad at scripting
If you need to paste without formatting - Ctrl+Shift+V on PC.