• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

How can I make a new text frame for selected text?

Explorer ,
Jan 14, 2017 Jan 14, 2017

Copy link to clipboard

Copied

Before:

After:

Views

853

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 14, 2017 Jan 14, 2017


Capture d’écran 2017-01-14 à 23.41.32.png

… One light-saber hit! …

Capture d’écran 2017-01-14 à 23.42.01.png

… Nothing seems to have happened! 

Just use The Force!

/* 

    Script wrtitten by Michel Allio (aka Obi-wan Kenobi)  [2017/01/14]

    See: https://forums.adobe.com/thread/2263331

*/

app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Anchor Text Selection! …"); 

function main()

{

    try {

        var myOStyle = app.activeDocument.objectStyles.item("mySel");

        myOStyle.name;

    } catch (e) {

        var myOStyle = app.activeDocument.ob

...

Votes

Translate

Translate
Community Expert ,
Jan 14, 2017 Jan 14, 2017

Copy link to clipboard

Copied

You show us an anchored item, your question is not that clear: what exactly do you want?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 14, 2017 Jan 14, 2017

Copy link to clipboard

Copied

Before: I select text. After: New textframe and into the selected text

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 14, 2017 Jan 14, 2017

Copy link to clipboard

Copied

Select the text.

Cut it from the text frame.

Deselect the text frame.

Choose Paste.

Adjust the new text frame to see all the text.

Click where you want the text to be.

Choose Paste.

HOWEVER if you don't mind losing the text as text, select the text.

Choose Create Outlines from the Type menu

The text will be converted to an object in the text flow.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 14, 2017 Jan 14, 2017

Copy link to clipboard

Copied


Capture d’écran 2017-01-14 à 23.41.32.png

… One light-saber hit! …

Capture d’écran 2017-01-14 à 23.42.01.png

… Nothing seems to have happened! 

Just use The Force!

/* 

    Script wrtitten by Michel Allio (aka Obi-wan Kenobi)  [2017/01/14]

    See: https://forums.adobe.com/thread/2263331

*/

app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Anchor Text Selection! …"); 

function main()

{

    try {

        var myOStyle = app.activeDocument.objectStyles.item("mySel");

        myOStyle.name;

    } catch (e) {

        var myOStyle = app.activeDocument.objectStyles.add({name: "mySel", enableFill: false, enableStroke: false});

    }

    var mySel = app.selection[0],

    myLeading = mySel.leading,

    myFrame = mySel.insertionPoints[-1].textFrames.add();

    mySel.characters.itemByRange(0, mySel.characters.length-2).move (LocationOptions.after, myFrame.insertionPoints[0]);

    myFrame.textFramePreferences.autoSizingType = AutoSizingTypeEnum.HEIGHT_AND_WIDTH;

    myFrame.textFramePreferences.useNoLineBreaksForAutoSizing = true;

    myFrame.insertionPoints[0].leading = myLeading;

    myFrame.applyObjectStyle(myOStyle);   

}

// _____ (^/)  _____ \\

Capture d’écran 2017-01-14 à 23.42.16.png

… and join The Rebellion!

(^/) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 14, 2017 Jan 14, 2017

Copy link to clipboard

Copied

I second Frans: what's the final goal of all this? What do you expect to gain? Isn't it just another incarnation of the famous 'xy problem"?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 15, 2017 Jan 15, 2017

Copy link to clipboard

Copied

LATEST

Thank you so much by Obi-wan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines