Call TinyMCE in a WordPress plugin

后端 未结 8 1367
悲哀的现实
悲哀的现实 2020-12-24 05:33

Is there a way to add TinyMCE into my own WordPress plugin?

I have a textarea in my back end script and want to make this area into a TinyMCE WYSIWYG editable field.

8条回答
  •  余生分开走
    2020-12-24 06:13

    This is much easier to do in WordPress 3.3 using the wp_editor() function.

    I'm working on a plugin that will add a TinyMCE instance to a theme options page. Here's what it looks like:

    // Add TinyMCE visual editor
    wp_editor( $content, $id );
    

    Where $content is the stored content and $id is the name of the field. Options can also be passed to customize the TinyMCE functionality, check out the WordPress Codex for more details.

提交回复
热议问题