I'm using the following code in functions.php to add a TinyMCE box on custom field textareas inside the Editor:
add_action('admin_print_footer_scripts','FT_TinymceCustom',99);
function FT_TinymceCustom()
{
?>
<script type="text/javascript">
jQuery(function($)
{
var i=1;
$('.customEditor textarea').each(function(e)
{
var id = $(this).attr('id');
if (!id)
{
id = 'customEditor-' + i++;
$(this).attr('id',id);
}
tinyMCE.execCommand('mceAddEditor', false, id);
});
});
</script>
<?php
}
However, on any box I add this to, it seems to cause a bug that deletes paragraph tags.
So if I enter this in the custom TinyMCE textarea (source view):
<p>test</p>p>test</p>
After saving, this is what shows in the box:
p>test test</p>
This only occured after the latest 3.9 update, which forced me to modify my JS code above to make it work.
<p></p>
tag and if u set image between the text it will show anchor tag not the image