Button not visible in Frontend: wp_editor()

32 views
Skip to first unread message

Maximilian Meyer

unread,
Dec 3, 2013, 1:12:03 AM12/3/13
to openbook4...@googlegroups.com
Frist of all I want to say that this is a great plugin and it works perfectly in the backend.
In the frontend however the openbook-button does not show up in the tinymce editor.

I use the function

<?php wp_editor( $description, 'new-post-desc'  ); ?>

to display the editor. I would be very greatful for help.

Best regards

Frederic





John Miedema

unread,
Dec 3, 2013, 9:22:42 AM12/3/13
to openbook4...@googlegroups.com
Hi Frederic, the button shows up without problem in the default editor button array. It looks like you are doing something custom with the editor. Have a look at the main php page in the plugin, openbook.php. In particular, look at these lines:

			add_filter( 'mce_buttons', array( $this, 'filter_mce_button' ) );
			add_filter( 'mce_external_plugins', array( $this, 'filter_mce_plugin' ) );
			add_filter('mce_css', 'filter_mce_css');

You will require the indicated functions as well: filter_mce_button, filter_mce_plugin, filter_mce_css. These are included further down the page. Your implementation may require a variation on this, but that's how I include them in the default editor array. Hope that helps.

John

Maximilian Meyer

unread,
Dec 6, 2013, 8:24:02 PM12/6/13
to openbook4...@googlegroups.com
Thanks for the hint, I really tried to make it work  but somehow all buttons are listed except the openbook_button when I use the editor in front-end forms - probably it is a problem with my theme or wp-user-frontend which I am using for front-end-posting. I wll report if I find a solution.
Reply all
Reply to author
Forward
0 new messages