Re:Rainbow.js - code syntax highlighting in 1.2kb
by sshrin on Monday March 26, 2012 @12:32PM
(#3757416)
Is there a way to style dynamically inserted <code> blocks (say inserted via an ajax call) after the page loads? I did not see an equivalent of the prettify() function of google-code-prettify that lets you do this. Looks great otherwise.
[ Parent
| on HN ]
Re:Rainbow.js - code syntax highlighting in 1.2kb
by MatthewPhillips on Monday March 26, 2012 @12:38PM
(#3757443)
Looks to me like Rainbow.init() would do it.
Re:Rainbow.js - code syntax highlighting in 1.2kb
by craigc on Monday March 26, 2012 @12:40PM
(#3757460)
Yeah I just have to make Rainbow.init() public and make it ignore blocks that have already been processed. Then this will work. Feel free to make a ticket for me on https://github.com/ccampbell/rainbow/issues