I have a custom post type in which I have added multiple wysiwyg editors, when I click on visual, the content of the editor (button, text, title) get inside of the wysiwyg editor.. it's odd.
It looks like I'm adding the old-style tiny-mce editors in the wrong fashion.
I'm adding an editor like this:
function addProgramDescriptionEditor() {
global $post;
$custom = get_post_custom($post->ID);
$x = self::ATTRIBUTE_PROGRAMMA_DESCRIPTION;
$program_content = $custom[$x][0];
wp_editor($program_content, self::ATTRIBUTE_PROGRAMMA_DESCRIPTION, $settings = array('textarea_name' => self::ATTRIBUTE_PROGRAMMA_DESCRIPTION));
}
And then on the adminInit:
add_meta_box(self::ATTRIBUTE_PROGRAMMA_DESCRIPTION, self::TITLE_PROGRAMMA_DESCRIPTION, self::class . "::addProgramDescriptionEditor", self::TYPE_SLUG, 'normal', 'high');
Is there another way of adding the visual/mce editor to your custom post type? In a way that it doesn't break when you switch to Visual editing.
Or is my implementation the cause of the newly added editors (besides the main one on top) breaking when switching to the visual editor?