Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
<h1>Sample Rich Text Editor</h1>
<div id="sample_textarea"></div>
<script language="javascript" type="text/javascript" src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
//-- <![CDATA[
theme : "advanced",
dialog_type : "modal",
plugins : "inlinepopups,fullscreen, spellchecker, paste, directionality",
theme_advanced_buttons1 : "bold,italic,underline, strikethrough, |, justifyleft,justifycenter,justifyright,justifyfull, |, forecolor, backcolor",
theme_advanced_buttons2: "undo, redo, |, bullist, numlist, |, code, |, fullscreen, spellchecker, |, ltr,rtl",
theme_advanced_buttons3: "",
theme_advanced_buttons4: "",
theme_advanced_resizing : true,
theme_advanced_toolbar_location : "top",
content_css : "/styles/qa_styles.css",
spellchecker_languages : "+English=en",
extended_valid_elements : "input[name|size|type|value|onclick],iframe[height|width|src],style[type]",
setup : function(ed) {
ed.onPaste.add( function(ed, e, o) {
ed.execCommand('mcePasteWord', true);
return tinymce.dom.Event.cancel(e);
var $sample_rte = $j("<textarea>");
$sample_rte.css({ width: "98%", height: "200px"});
tinyMCE.execCommand('mceAddControl', false, $sample_rte[0]);
//-- ]]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.