// Version 1.1 var dom = fw.getDocumentDOM(); var ORIGINAL_TEXT_TOKEN = "%t"; var txt = prompt('Enter text to populate all selected text fields. Use "' + ORIGINAL_TEXT_TOKEN + '" for original text.', txt || ORIGINAL_TEXT_TOKEN); for(var s in fw.selection){ if(fw.selection[s] == '[object Text]') fw.selection[s].textChars = txt.split(ORIGINAL_TEXT_TOKEN).join(fw.selection[s].textChars); } dom.changeCurrentPage(dom.currentPageNum); // force screen refresh dom.redraw();