Modalpreview
Modalpreview is a lightweight jQuery script that makes it possible to preview the textarea
content in a modal window before submitting the form. It automatically adds a preview button
next to the submit button that brings up a modal window containing the textarea content,
without reloading the entire page. It converts line breaks to <br> and
removes the <script> tag to prevent hacking. Modalpreview can also strip
HTML before rendering the preview.
Features (as originally published)
- Automatically adds preview functionality to any textarea inside an HTML form
- Cross-browser modal window with the textarea content rendered as HTML
- jQuery plugin, easy to implement
- Very useful in blog comments to avoid page loads
- No javascript styles: use your own CSS files to add style
- Tested in Safari 3, Firefox 2, MSIE 6, MSIE 7, Opera 9
The original script is still served at its historical path for the sites that hotlink it:
/media/js/jquery.modalpreview.js
(v1.0, header and license comments preserved verbatim). It targets jQuery ~1.2 and is
unmaintained.
Modalpreview improved the feedback loop before submitting; devkick's current build nights use live demos and teardowns to make that loop public on the events calendar.