admin管理员组文章数量:1279186
I'm trying to add tinyMCE instead of textarea for one of my options in my plugin with no luck so far. I tried this :
/
and this:
/
There seems to be some problem with styles as styles for tabs (HTML style/Visual style) dont work. Anybody knows about implementation that works 100% with WP 3.0 and up ?
I'm trying to add tinyMCE instead of textarea for one of my options in my plugin with no luck so far. I tried this :
http://www.dbuggr/smallwei/add-wysiwyg-editor-tinymce-wordpress-plugin/
and this:
http://blog.imwd8solutions/wordpress/wordpress-plugin-development-add-editor-to-plugin-admin-page/
There seems to be some problem with styles as styles for tabs (HTML style/Visual style) dont work. Anybody knows about implementation that works 100% with WP 3.0 and up ?
Share Improve this question asked Jan 3, 2011 at 19:28 chubbykchubbyk 3712 gold badges4 silver badges7 bronze badges 03 Answers
Reset to default 12Pre WP 3.3: http://www.dev4press/2010/tutorials/wordpress/tips/add-rich-text-editor-to-your-plugin/
If you are using WP 3.3 or later you might look up wp_editor: http://codex.wordpress/Function_Reference/wp_editor
$settings = array(
'teeny' => true,
'textarea_rows' => 15,
'tabindex' => 1
);
wp_editor(esc_html( __(get_option('whatever_you_need', 'whatever'))), 'terms_wp_content', $settings);
<?php
function my_address_function(){
if(isset($_POST['special_content'])){
update_option('special_content', $_POST['special_content']);
}
?>
<div class='wrap'>
<h2>My Super Admin Page</h2>
<form method='post'>
<?php
$content = get_option('special_content');
wp_editor( $content, 'special_content', $settings = array('textarea_rows'=> '10') );
submit_button('Save', 'primary');
?>
</form>
</div><!-- .wrap -->
<?php
}
?>
If I am reading your question correctly:
wordpress/extend/plugins/tinymce-advanced/
There's a checkbox in the options to show the custom styles of the theme.
本文标签: How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with Wordpress 30 and up
版权声明:本文标题:How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with Wordpress 3.0 and up? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741297816a2370917.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论