Skip to content

Instantly share code, notes, and snippets.

@orjan
Created July 12, 2010 18:20
Show Gist options
  • Save orjan/472845 to your computer and use it in GitHub Desktop.
Save orjan/472845 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Full featured example using jQuery plugin</title>
<!-- Load jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
<textarea class="tinymce">
</textarea>
</form>
<p id="mybutton">Button</p>
<script type="text/javascript">
$().ready(function() {
$("#mybutton").click(test);
});
function test() {
if(typeof tinyMCE == "undefined") {
$.getScript('../jscripts/tiny_mce/jquery.tinymce.js', setupTinymce);
}
}
function setupTinymce() {
$('textarea.tinymce').tinymce({
// Location of TinyMCE script using gzip
script_url : '/system/tinymce/jscripts/tiny_mce/tiny_mce_src.js'
});
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment