markitup/1.x — pull request #9 by lecterror (2012-06-19 10:28:06+00:00)
Title: Adding previewHandler to skip MIU preview rendering and handle it all "manually"

I'm trying to use client-side preview (Markdown in my case) and the trouble is that when I use the `previewParser` option, I don't really have a chance to style my preview (the template is not used, and nothing in the `iframe` can be styled due to XSS..at least I'm not aware it's possible).

The `previewHandler` option would simply be a custom function provided by the user to handle *everything*: parsing, preview element.. and skip the MIU logic entirely.

This allows for completely custom previews, for example, I can now put my preview in a div wherever and whenever I need it, and I don't have to depend on MIU positioning or styling etc. (not that there's anything wrong with that:))