I'm creating a repeatable meta box using this code below. how can i add a wysiwyg editor in this textarea field . any help is very much appreciated
How to create meta box using clone ajax and jquery in wordpress
Thanks
I'm creating a repeatable meta box using this code below. how can i add a wysiwyg editor in this textarea field . any help is very much appreciated
How to create meta box using clone ajax and jquery in wordpress
Thanks
Add the class 'theEditor' to your textarea.
<textarea class=”theEditor” name=’blurb’ id=’blurb’></textarea>
Edit:
You can also add editor with js
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#blurb").addClass("mceEditor");
if ( typeof( tinyMCE ) == "object" &&
typeof( tinyMCE.execCommand ) == "function" ) {
tinyMCE.execCommand("mceAddControl", false, "blurb");
}
});
</script>
<textarea class="" name='blurb' id='blurb'></textarea>