wp_editor some functionality not working on custom theme
-
I am creating a custom theme. In this theme I have some custom options in the edit page screen. For this I have a custom button which appears and when clicked it opens a overlay div which I created (this overlay has the custom option fields). Both the HTML for the button and overlay are output through the “post_submitbox_misc_actions” action. The basic form of it looks like this in my functions.php file:
add_action( ‘post_submitbox_misc_actions’, ‘add_custom_button’ );
function add_custom_button() {
global $current_screen;
if( $current_screen->post_type == ‘page’ ) {
//The custom button and HTML is echoed out here
}
}
Now I want to add the default WordPress editor as a field in my overlay div. To start with this I took a basic example from the codex:
$content = ”;
$editor_id = ‘mycustomeditor’;wp_editor( $content, $editor_id );
This displays, however, I am having issues with some of the functionality for it. For example if I click on the “text” tab nothing happens, the same if I click on the “Insert Download”, “Add Media” buttons. If I click on the “Insert Download” button the URL will get appended with “#TB_inline?width=640&inlineId=choose-download” but nothing else happens. All of the other buttons on the editor work.
I have checked my browser console and receive no JavaScript errors when the editor loads/I click a button on the editor.
Is there anything else I need to do to use the editor, or something I missed or set up incorrectly?
- The topic ‘wp_editor some functionality not working on custom theme’ is closed to new replies.