Thread Text on Path in Reverse Direction
Hello! I am looking for a way to thread text between two paths in the reverse direction. Essentially I want my text aligned to the bottom/end of the threaded paths so that the beginning of the text appears to pop backward rather than forward. If there's no overflowing text, I still want the text to sit in the second path. Here's an illustration:
Here is a copy of the script I use to thread text between paths. How would you solve this? Thank you!
/**
* @@@BUILDINFO@@@ AddTextPathsAndThreadToStory-SELECTION.jsx !Version! Tue Jun 05 2018 10:33:14 GMT+0200
*/
( function()
{
/*
Script by Uwe Laubender
Posted at Adobe InDesign Forum:
How to curve text within a paragraph
kol28429812 Jun 5, 2018 7:54 AM
https://forums.adobe.com/message/10425153#10425153
Script adds text path to selected item if no text path is there.
Script threads text path 1 of every selected item in order of selection if possible.
*/
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
app.doScript
(
addTextPathsAndThreadThem,
ScriptLanguage.JAVASCRIPT,
[],
UndoModes.ENTIRE_SCRIPT,
"Add Text Paths to Selection and Thread them | SCRIPT"
);
function addTextPathsAndThreadThem()
{
// Do nothing, if:
if( app.documents.length == 0 ){ return };
if( app.selection.length == 0 ){ return };
if( app.selection.length == 1 && app.selection[0].hasOwnProperty("baselineShift") ){ return };
if( app.selection.length == 1 && app.selection[0].constructor.name == "Cell" ){ return };
if( app.selection.length == 1 && app.selection[0].constructor.name == "Table" ){ return };
if( app.selection.length == 1 && app.selection[0].textPaths.length > 0 ){ return };
if( app.selection.length == 1 && app.selection[0].textPaths.length == 0 )
{
app.selection[0].textPaths.add();
return
};
var sel = app.selection;
var selLength = sel.length;
var textPathsArray = [];
var e;
for( var n=0; n<selLength; n++)
{
if(sel[n].textPaths.length == 0){ sel[n].textPaths.add() };
};
for( var n=0; n<selLength-1; n++)
{
var thisTextPath = sel[n].textPaths[0];
var nextTextPath = sel[n+1].textPaths[0];
try
{
thisTextPath.nextTextFrame = nextTextPath;
}catch(e){ continue };
};
};
}() )

