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?

  • Unless I'm reading you incorrectly, the text frame in Photoshop is always the size of the text's bounding box. Resizing the box resizes the text, not just the frame.
    – Tetsujin
    Nov 1 '18 at 13:54
  • @Tetsujin The OP refers to a text box frame with text inside, not a regular "click and type text frame".
    – user120647
    Nov 1 '18 at 14:10
  • @Anne there's a script that makes it, but isn't free, maybe somebody here knows it.
    – user120647
    Nov 1 '18 at 14:10
  • InDesign can do more than that by the way, you can set text boxes to Auto Height so they always fit the content, whatever edits are being made. Photoshop's typesetting abilities cannot be compared to InDesign's.
    – Lucian
    Nov 1 '18 at 16:26

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:

  • This part: 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.

enter image description here

// 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[1].value;
var right = bounds[2].value;
var bottom = bounds[3].value;
var left = bounds[0].value;

var width = right - left;
var height = bottom - top;

active.textItem.width = width;
active.textItem.height = height;

app.preferences.rulerUnits = rulerUnits;

You can launch scripts with a shortcut by putting them in the Photoshop 2021/scripts/ folder, restarting PS and then giving it a shortcut from Edit > Keyboard shortcuts... and in that window Shortcuts for: Application menus (dropdown) > (below) File > Scripts (you have to scroll down quite a bit). Then just give it a shortcut. When you put scripts in the script folder, you can also launch them from the menu path File > Scripts > ..., where you can also see the shortcut you give it, if you do.

Another way to launch scripts is by recording an action where you just launch the script (the way I did it in the gif): Start recording a new action, then either launch it from the File > Scripts > ... list or File > Scripts > Browse and launch it from anywhere in your HDD.

I also had the button mode on in the Actions panel. Just open the corner menu in the Actions panel and choose Button mode. It can be handy, but FYI, you can also run actions in the regular mode by double clicking the action, if you press down Ctrl (on windows) or CMD (on Mac).


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.