Skip to content

Instantly share code, notes, and snippets.

@rdhyee
Created January 3, 2014 20:09
Show Gist options
  • Save rdhyee/8245579 to your computer and use it in GitHub Desktop.
Save rdhyee/8245579 to your computer and use it in GitHub Desktop.
An example invocation of op.visitSubs in Fargo Scripting (http://docs.fargo.io/fargoScripting) to run in the JavaScript console in context of a Fargo.io outline to understand how op.visitSubs works.
op.visitSubs ( //get bodytext
function (headline, levelnum) { // lineCallback
console.log("lineCB -> headline, levelnum: " + headline.getLineText () + ", " + levelnum);
},
function (levelnum) { // indentCallback
console.log("indentCB -> levelnum: " + levelnum);
},
function (levelnum) { // outdentCallback
console.log("outdentCB -> levelnum: " + levelnum);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment