Visual editor broken when using wp_editor in PHP
-
I’m trying to use the tinyMCE visual editor in a page created using PHP
here’s the relevant code
$content = ‘some content’;
$editor_id = ‘shmoo’;
$settings = array(‘teeny’=>true);<form…>
wp_editor( $content, $editor_id, $settings);
</form…>First time the page is displayed, it opens on the visual editor with the correct buttons on the page.
I enter some text and then switch to “text” to edit the code. Now it won’t switch back to Visual – even if I save the data and close the page. The only way I can get the visual tab back is to go to /wp-admin, edit a page (which opens in text), switch to visual and then save the page then go back to the page that uses wp_editor, click on visual & refresh the page.Fails in every browser, fails with every plugin disabled, fails with every theme, fails with whatever I put in the $settings array
- The topic ‘Visual editor broken when using wp_editor in PHP’ is closed to new replies.