BBCode example
This example shows you how to use TinyMCE to edit contents in BBCode syntax commonly used by forums and comment systems.
HTML source
Below is all you need to setup the example.
<script type="text/javascript" src="<your installation path>/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "none",
plugins : "bbcode",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,styleselect,removeformat,cleanup,code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "center",
theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle",
content_css : "css/bbcode.css",
entity_encoding : "raw",
add_unload_trigger : false,
remove_linebreaks : false,
inline_styles : false,
convert_fonts_to_spans : false
});
</script>
<form method="post" action="somepage">
<textarea name="content" style="width:100%">
</textarea>
<a href="#" onclick="tinyMCE.execCommand('mceToggleEditor',false,'content');">[Toggle WYSIWYG]</a>
</form>
More Examples
Here are more examples showing off different features of TinyMCE.
© 2003-2010