In Indesign, you can double-click the text frame corners and your text field will crop so the frame is the same size as the text. Do any of you know if you have a similar function in Photoshop?
You can sort of do it by converting the paragraph text to point text and then back to paragraph text.
Type > Convert to point text and
Type > Convert to paragraph text. This method isn't very accurate. It leaves some of empty space in the text frame.
You can get something a bit more usable with scripts. I've made this script just for my own use so it's a bit rough around the edges:
active.textItem.height = 10000;(line 9) essentially just makes the text frame ridiculously tall before finalizing the text frame resize, so that hidden text is included in the resize. If removed, the script will just resize to what is visible, leaving hidden text alone.
Text flow may sometimes shift around a little.This happens in the gif on the 4th run time before I move the panel. Because of that the text box doesn't resize perfectly but running the script again in that situation solves that.
// Fit Text Frame To Content.jsx var rulerUnits = app.preferences.rulerUnits; app.preferences.rulerUnits = Units.POINTS; var doc = app.activeDocument; var active = doc.activeLayer; active.textItem.height = 10000; var bounds = active.boundsNoEffects; var top = bounds.value; var right = bounds.value; var bottom = bounds.value; var left = bounds.value; var width = right - left; var height = bottom - top; active.textItem.width = width; active.textItem.height = height; app.preferences.rulerUnits = rulerUnits;
Anne. This is a known and asked feature that we, editorial designers, keep expecting in other programs as illustrator or photoshop. Is not featured in them. You either have to manually adapt the box