- This topic has 5 replies, 2 voices, and was last updated 4 years, 11 months ago by
Nayeem Riddhi.
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!
-
This topic was modified 4 years, 11 months ago by
nick peterson.
Can you please elaborate more on your issue, if possible, please share your related URL, please, give your temporary wp-admin login details in a private reply for checking the issue.
Thanks
The WPDM uses wpdm-add-package-file-front.php to display the frontend tinymce editor.
I want to add a custom button to the toolbar, which I failed to do unfortunately.
You, or your developers used an array to add buttons to the toolbar:
'tinymce' ► array('toolbar1' ► 'bold,italic,underline,strikethrough,bullist,link,unlink'),
I want to add my custom button to this toolbar.
I have successful added my custom button to my wordpress backend tinymce editor.
I don’t know how to add it via the wpdm-add-package-file-front.php.
If I know how to add a registered custom button through this .php file, you helped me a lot!
I cannot give login detail, I have this running at a local flywheel pc at the moment.
But I can give you my functions.php how I added the custom button..
Thank you!
Hi,
Are you talking about frontend-uploader, please let me know
thanks
Yes, I’m talking about the frontend uploader.
please check this add-on, https://www.wpdownloadmanager.com/download/advanced-tinymce-button/, i hope it may help you
thanks
The topic "Add custom [shortcodes] tinymce" is closed to new replies.