Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Initialize TinyMCE with JQuery

Tags:

jquery

tinymce

I'm trying to initialize TinyMCE with JQuery for a specific class of textarea called "tinymce".

Moxiecode has a wiki of how to do this: http://tinymce.moxiecode.com/wiki.php/jQuery_Plugin

Unfortunately, when I try to implement it, it doesn't work. I've downloaded the JQuery version of TinyMCE and I'm quite sure the URL I specified is right.

Please find my code below:

<!DOCTYPE HTML>  
<html lang="en">
<head>
    <title>TestB</title>

<script type="text/javascript" src="jscripts/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="jscripts/tinymce_3.4.1_jquery/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript">

$(document).ready(function() {  // I also tried $().ready(function() 
   $('textarea.tinymce').tinymce({  
      script_url : 'jscripts/tinymce_3.4.1_jquery/tinymce/jscripts/tiny_mce/tiny_mce.js',  
      theme : "advanced"
   });  
});  
</script>
</head>
<body>
<textarea class="tinymce"></textarea>
</body>

Thanks in advance!

like image 764
Kamil Sindi Avatar asked May 30 '26 22:05

Kamil Sindi


1 Answers

Is there a jquery.tinymce.js file included with the TinyMCE package? In the version I use, at least, there's a separate script file that needs to be included in order to add the tinymce extension function to jQuery.

like image 197
Adam Price Avatar answered Jun 02 '26 13:06

Adam Price