Created
June 10, 2010 18:24
-
-
Save gdakram/433415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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[ | |
tinyMCE.init({ | |
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); | |
}); | |
} | |
}); | |
$j("document").ready(function(){ | |
var $sample_rte = $j("<textarea>"); | |
$sample_rte.css({ width: "98%", height: "200px"}); | |
$j("#sample_textarea").append($sample_rte); | |
tinyMCE.execCommand('mceAddControl', false, $sample_rte[0]); | |
}) | |
//-- ]]> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment