.setCode drops syntax highlight
Status: Beta
Brought to you by:
fermads
After making a call to .setCode no automatic syntax highlight is being performed. Attached is test file.
The behavior is actually inconsistent:
After executing .setCode for the first time - the text is set but syntax is not highlighted. If scrolling is performed, then "some" elements are being highlighted.
After another execution of .setCode nothing is getting highlighted even after scroll.
I've checked this on WinXP in FF2.0.0.8 and IE6
It seems that calling
self.editor.syntaxHighlight('init');
in .setCode method of codepress.js after self.editor.setCode(code); fixes the issue, but I'm not sure if this is the proper way to handle it.
sample of .setCode bug
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).