Hello. I successful registered a custom shortcode in my function.php of my WordPress.
My shortcode works perfect on the backend in wordpress using tinymce.
But.. I want to add this shortcode to the frontend of tinymce that is implemented in the WPDM plugin.
I’m not able to get the custom shortcode as a button/icon in to the frontend tinymce.
The code that WPDM uses in the wpdm-add-package-file-front.php
:
wp_editor(wpautop(stripslashes($cont)),'post_content', array('textarea_name' ► 'pack[post_content]', 'teeny' ► 1, 'media_buttons' ► 0,
'tinymce' ► array('toolbar1' ► 'bold,italic,underline,strikethrough,bullist,link,unlink'),
I tried to disable the ‘teeny’ (teeny ► 0
) but then also the custom button is not showing, and I get a lot of unwanted toolbars.
I tried to add the custom button to the array without any luck:
wp_editor(wpautop(stripslashes($cont)),'post_content', array('textarea_name' ► 'pack[post_content]', 'teeny' ► 1, 'media_buttons' ► 0,
'tinymce' ► array('toolbar1' ► 'bold,italic,underline,strikethrough,bullist,link,unlink, my_custom_button'),
How can I add a custom button to the frontend tinymce editor that WPDM has implemented?
Thank you!