Display wordpress editor in any plugin/custom page on admin side
Posted On : August 14, 2013
| No Comment
Many times it is required to add an extra editor on admin side in wordpress. So, for that different plugins are also available like : “Types – Custom Fields and Custom Post Types Management” Plugin or “tinyMCE” Plugin.
But, displaying and editor is also possible using a simple code.
Add below code where want to display wordpress editor
“$content” is global variable, use as it is and “‘myeditor’” is the id attribute value for textarea(this need to be in lowercase letters, no underscores, no hyphens allowed in id)
Also, if want to give css class to editor, than use below code,
$settings = array(‘editor_css' => ‘classname’); wp_editor( $content, ‘myeditor’, $settings );
in “$setting” array you can specify what extra you want to do in editor, like
Remove media-button from editor then,
$settings = array( 'media_buttons' => false );