Copy link to clipboard
Copied
Dear friends,
Is there a way using the InDesing javascipt to switch a textframe back and forth from the type of FrameTypes.FRAME_GRID_TYPE to FrameTypes.TEXT_FRAME_TYPE in the CJK version of InDesign?
I have tried to write a script creating a InDesign document with textframes in the type of FrameTypes.FRAME_GRID_TYPE.
But the textframe on the first page was always in the type of FrameTypes.TEXT_FRAME_TYPE.
I am trying to switch the textframe to the type of FrameTypes.FRAME_GRID_TYPE, but still in struggle.
Need your help. Thanks.
Solved:
In CJK version of InDesign, after creating the document:
var myDoc = app.documents.add();
1) Find the text frame
2) Find the parentStory of the text frame
3) Find the storyPreferences of the story
4) Set the value of the variable frameType to FrameTypes.FRAME_GRID_TYPE or FrameTypes.TEXT_FRAME_TYPE, according to the need.
Copy link to clipboard
Copied
Solved:
In CJK version of InDesign, after creating the document:
var myDoc = app.documents.add();
1) Find the text frame
2) Find the parentStory of the text frame
3) Find the storyPreferences of the story
4) Set the value of the variable frameType to FrameTypes.FRAME_GRID_TYPE or FrameTypes.TEXT_FRAME_TYPE, according to the need.