TinyMCE Not Defined Error
Posted
by Tim
on Stack Overflow
See other posts from Stack Overflow
or by Tim
Published on 2010-03-12T12:43:29Z
Indexed on
2010/03/12
12:47 UTC
Read the original article
Hit count: 637
tinymce
|JavaScript
I am trying to add TinyMCE to page but I am getting these errors:
Error: tinyMCE is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/langs/en.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js Line: 1 Error: tinymce is not defined Source File: https://my.secure.site/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js Line: 1
Here is the code I have in header:
<script type="text/javascript" src="https://my.secure.site/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="https://my.secure.site/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
$(document).ready(function() {
tinyMCE.init({
mode: "textareas",
script_url: "https://my.secure.site/tinymce/jscripts/tiny_mce/tiny_mce.js",
theme: "advanced",
plugins: "pagebreak,style,advimage,advlink,iespell,preview,media,paste",
theme_advanced_buttons1: "help,newdocument,|,bold,italic,underline,strikethrough,|,link,unlink,anchor,image",
theme_advanced_buttons2: "fontsizeselect,hr,removeformat,charmap,visualaid,sub,sup",
theme_advanced_buttons3: "cut,copy,paste,|,undo,redo,|,cleanup,code,preview",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: false,
editor_selector: "tinymce",
width: "398px",
force_p_newlines: false,
force_br_newlines: true
});
});
</script>
And this is my textarea that I'm expecting TinyMCE to use:
<textarea id="post1msg" class="tinymce" rows="4" cols="40"><?=$r->post->message?></textarea>
Please does anyone have any idea why it's not working?
© Stack Overflow or respective owner