discourse/discourse — pull request #477 by awbergs (2013-03-16 04:12:21+00:00)
Title: Markdown.Editor manualPreview option. Pagedown/Markdown code cleanup. Sanitizer script load callback.

**Notes**
- cleaned up some variable caching and newlines / if blocks / strict equality comparisons.
- added option to disable automatic preview events
- added callback to html-sanitizer-bundle script load to ensure preview is generated on page load
- fixed a double timeout inside the refresh method (applyTimeout on a debounced method).

**Commit message**

Markdown.Editor cleanup. cached setScrollPanelTops calculations. Added option to set preview to manual, won't bind input events. removed double timeout call in refresh (applyTimeout + debounce). added wait callback in pagedown_editor to sanitizer script to refresh preview on load.