Create text frame from selected text in indesign
- This topic has 2 replies, 2 voices, and was last updated 8 years, 2 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Create text frame from selected text in indesign
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Create text frame from selected text in indesign
Hi;
I’m working with long documents in indesign. Create text frame from selected text in indesign?
1. I select and copy text.
2. paste into pasteboard text.
3. Cut text frame and paste into the text field again.
Is there a script that will do automatic?
Thanks in advance for any assistance you can offer.
What do you mean by ‘paste into the text field again’? That the frame becomes an inline? If what you select is on a single line, then the script below would do it. Select some text, all on one line, and run the script.
(function(){ var width = app.selection[0].endHorizontalOffset - app.selection[0].horizontalOffset; var frame = app.selection[0].textFrames.add(); app.selection[0].move (LocationOptions.AFTER, frame.insertionPoints[0]); var gb = frame.geometricBounds; gb[3] = gb[1]+width frame.geometricBounds = gb; }());
Peter
Thanks Peter, works great. text overflow in text frames are created. already resolved the problem with the object style. Thanks a lot for your reply and valuable information.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!