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

flatten conref in framescript

Community Beginner ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

Hi 

 

do you know how can I flatten conref in framescript, I have it in extendscript - can you convert it to framescript ?

 

function flattenConref(oDoc) {
var oConref = oDoc.FirstTiInDoc;
while (oConref.id != 0) {
var oNextConref = oConref.NextTiInDoc;
var tloc = oConref.TextRange.beg;
var eloc = oDoc.TextLocToElementLoc(tloc);
var oElem = eloc.child;

oConref.ConvertToText();
var lElemAttributes = oElem.Attributes;
var i = 0;
while (i < lElemAttributes.length) {
if (lElemAttributes[i].name == "conref") {
lElemAttributes[i].values[0] = "";
oElem.Attributes = lElemAttributes;
break;
}
i++;
}
oConref = oNextConref;
}
}

Views

72

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
no replies

Have something to add?

Join the conversation