Add tinymce to custom widget plugin

Hello.

I have created a widget plugin where I can edit a 4 different textareas in one go.

If I use plain textareas it works fine.

When I try to add tinymce I will get the tinymce look. But I cannot edit the text and all the tinymce buttons are inactive.

Here is the PHP code I use:
<?php
$settings = array
(
'textarea_name' => 'content',
);
wp_editor($content, 'textarea_id', $settings);
?>

  • Vaughan
    • Support/SLS MockingJay

    Hi @awesomeuser

    welcome to the community.

    not sure if this will do the job, but i found this plugin a while back which turns textareas in widgets to use wysiwyg.

    it might save you the trouble.

    as for your code above. the id in wp_editor() can't contain underscores, can only be lowercase letters only. so instead of textarea_id, you would need to use textareaid.

    hope this helps, let us know if you require anymore help.

    thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.