Pete Winter
asked on
TinyMCE load in jQuery Post
I want to load TinyMCE ( https://www.tinymce.com/download/ ) to a textarea field within my Jquery post code below...
HTML
Query code...
It's not work for me. What am I doing wrong. Can you please send me revised working code please.
HTML
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>
tinyMCE.init({
mode : "textareas",
theme : "advanced"
});
</script>
<div id="Column1" class="ListResults"></div>
Query code...
$.post( "bespoke_page_script.php", {
cust_id: $('#customer_id').find(":selected").val()
}, function(data) {
$( ".ListResults" ).html( data );
tinymce.EditorManager.execCommand('mceAddEditor', false, "message_to_customer");
});
Code in bespoke_page_script.php ...
<p>
<label for="message_to_customer">Message to Customer</label>
<textarea name="message_to_customer" id="message_to_customer" cols="45" rows="10">
Dear xxxx
</textarea>
</p>
It's not work for me. What am I doing wrong. Can you please send me revised working code please.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry. You were right! Just realised my mistake. Many thanks
Great! Sometimes it's all about asking the right questions :-)
ASKER