Skip to content Skip to sidebar Skip to footer

Can I Google-code-prettify Only A Portion Of The Page? (run A Javascript Function On A Specified Portion Of The Page)

I am using google-code-prettify to format some code that I am placing on my website. the code is dynamically added by me through a javascript function. The code submits fine… an

Solution 1:

Pass the string containing the newly inserted code that needs formatting to prettyPrintOne.

This tutorial describes an implementation that does precisely this: Syntax Highlighting a la StackOverflow with Google Prettify .

Post a Comment for "Can I Google-code-prettify Only A Portion Of The Page? (run A Javascript Function On A Specified Portion Of The Page)"