Ignore Textwrap Script

Dave Saunders was kind enough to write Russell Viers a script that toggles a text frame’s Ignore Text Wrap setting.

Copy and paste the javascript code into a text editor, save it with the name ToggleTextWrap.jsx, and drop it into your scripts folder. Because it’s a javascript it will run on both Mac and Windows platforms. Note: the script has not been written to deal with multiple selected frames.

//DESCRIPTION: Toggle text wrap of selected or active text frame
try {
app.selection[0].textFramePreferences.ignoreWrap =
!app.selection[0].textFramePreferences.ignoreWrap
} catch (e) {
try {
app.selection[0].parentTextFrames[0].textFramePreferences.ignoreWrap
= !app.selection[0].parentTextFrames[0].textFramePreferences.ignoreWrap
} catch (e) {}
}

Once you’ve installed the script, you can use InDesign’s Keyboard Shortcut Editor to assign the shortcut of choice to the script. Just open the editor, pull down the Product Area menu and choose Scripts. Then, scroll down the list until you find your new script, select it and assign your shortcut. At that point you don’t even have to have the Scripts palette open. Hitting the shortcut executes the script.