Skip to main content
Balaji Murugesan
Known Participant
May 22, 2020
Question

select a text and apply no break using javascript

  • May 22, 2020
  • 2 replies
  • 6341 views

Hi ,

Please anyone give idea to apply no break for a letter at the end line in photoshop using javascript.

This topic has been closed for replies.

2 replies

Balaji Murugesan
Known Participant
May 24, 2020

it removes the “orphaned” words (that is, it adds inextricable spaces after ALL short words, and not just at the end of the line).

 

Please refer this video, 

https://www.youtube.com/watch?v=vXHkKzqEx6w

c.pfaffenbichler
Community Expert
Community Expert
May 24, 2020

If this is intended to be a feature request please post over on Adobe Photoshop Family

Legend
May 22, 2020

 

app.activeDocument.activeLayer.textItem.contents += "\u00A0"

 

 

app.activeDocument.activeLayer.textItem.contents = app.activeDocument.activeLayer.textItem.contents.replace (/\r/g,"\u00A0")

 

 

 

 

Balaji Murugesan
Known Participant
May 22, 2020

Hi Jazz,

 

thanks for your responce, here i shared snap now.

i need to apply no break for selected text using javascript, please your idea how to select the any work and the end of line, 

 

Legend
May 22, 2020

Unfortunately, in Photoshop, the script cannot be executed while the text is in edit mode (including selection).