Skip to content

Instantly share code, notes, and snippets.

@ccgus
Created September 29, 2012 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccgus/3805275 to your computer and use it in GitHub Desktop.
Save ccgus/3805275 to your computer and use it in GitHub Desktop.
webExportWillWriteHTMLForItem
in your VPWebExportScript page, you can have this which will do simple replacements:
function webExportWillWriteHTMLForItem(contextDictionary, item, fileName, mutableHTMLString) {
mutableHTMLString.replaceOccurrencesOfString_withString_options_range_("<p>", "<div>", 0, NSMakeRange(0, mutableHTMLString.length()));
mutableHTMLString.replaceOccurrencesOfString_withString_options_range_("</p>", "</div>", 0, NSMakeRange(0, mutableHTMLString.length()));
return mutableHTMLString;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment