How do I implement a live-updating preview (e.g. Stack Overflow posts)?
How can I achieve the exact same effect in Stack Overflow that makes the post preview, where the user types in a <textarea>
, and content开发者_如何学C is written to a <div>
?
Here's a very quick mockup in jsFiddle. This has absolutely no security whatsoever, so you'll want to implement that to avoid script injection and the like.
精彩评论