public
Last active

  • Download Gist
Content Editable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html>
<head>
<title></title>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function(){
$('span').click(function(){
alert($('.stuff').html());
})
})
</script>
</head>
 
<body>
<span>Output Formatted Content</span>
<div class="stuff" contenteditable="true">
<p><b>Bold</b></p>
<ul>
<li>List Item 1</li>
<li>List Item 2</li>
</ul>
</div>
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.