I noticed today that livepreview does not pick up the dynamically-generated CSS from the SyntaxHighlight_Geshi extension. The same problem occurs in liquidthreads: when you add a comment with a Geshi call in it, the CSS will not be picked up when the comment is initially saved. The first full reload of the page will pick up the css correctly neither case.
After some investigation, this is really an issue in core and will apply to any extension that needs to add CSS and/or javascript to the output HTML. To fix the bugs with livepreview, we would need some mechanism where AJAX calls receive not only new HTML, but also new CSS and/or javascript, and can add that CSS and javascript to the current page without a reload. Adding the CSS and javascript dynamically may be tricky from a compatibility standpoint, but having library functions in our site javascript would help with that.
I have not investigated the cause of the problem in liquidthreads.
The code in EditPage.php shows scars from similar problems, in a commented-out call to send a list of categories back to an AJAX preview request.
- Carl