Finally Fixing the “Show Hidden Characters” Menu Action [UPDATE]
February 15, 2025 | Snippets | en | fr
InDesign does not always show the hidden characters when you ask it to Show Hidden Characters! Why? Because the active document window may then be in some preview Screen Mode that prohibits the appearance of invisible characters. It's a bit silly, but that's how it is. Well, that's how it was until today. A simple startup script will solve this little paradox…
Update (15-Feb-25). Major improvements and bug fixes have been made in version 2.0. See the behaviour of the SMART_MODE
option in the source code. My thanks to Branislav Milić for the ideas he suggested.
You know the story by heart, but I'm going to retell it to you anyway: For the 2,749th time in your life, you're going to use the Cmd/Ctrl Alt I shortcut in the hope of seeing the hidden characters in your InDesign document. Or you will go into the Type > Show Hidden Characters menu. And once again, you will have forgotten that a preview mode is enabled, so the invisible character switch is indeed registered but has no effect (yet).
Quite often, this story even has a subplot: you know that the [W]
key would normally allow you to return to the desired display mode, but since you are currently inserting text, pressing [W]
would unfortunately result in the letter ‘w’ being typed. And you waste another second pondering your disenchantment.
A simple and definitive solution
It seems quite natural (to me) that the plan to reveal hidden characters implies deactivating any preview mode that could interfere with the goal. This is the idea implemented by TypeActuallyShowHidden.jsx, a simple startup script available in the IdGoodies repository.
A startup script should be placed, not in the [Scripts panel]
subfolder, but in the [startup scripts]
subfolder. This way, it is executed automatically when InDesign starts.
This script acts as a menu action listener. Whenever the user invokes Show Hidden Characters (either via the menu or a shortcut), it decides whether the normal Screen Mode should be restored as well — so you'll never have to deal with that step again.
The video capture below shows the initial and final state of the display mode:
This solution is so obvious that I'm kicking myself for not thinking of it sooner!
Download and install as startup script (InDesign CC/CS6/CS5/CS4):
→ TypeActuallyShowHidden.jsx (GitHub)