Add custom [shortcodes] tinymce

in Download Manager Free

Viewing 6 posts - 1 through 6 (of 6 total)
Mar 5, 2021 at 8:00 pm
#147962
Participant
nick peterson
OP

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.
Mar 6, 2021 at 10:27 am
#147992
Moderator
Nayeem Riddhi
Staff

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

Mar 6, 2021 at 11:34 am
#147996
Participant
nick peterson
OP

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!

Mar 7, 2021 at 6:04 am
#148022
Moderator
Nayeem Riddhi
Staff

Hi,

Are you talking about frontend-uploader, please let me know

thanks

Mar 8, 2021 at 6:35 pm
#148110
Participant
nick peterson
OP

Yes, I’m talking about the frontend uploader.

Mar 10, 2021 at 4:31 pm
#148243
Moderator
Nayeem Riddhi
Staff

please check this add-on, https://www.wpdownloadmanager.com/download/advanced-tinymce-button/, i hope it may help you

thanks

Viewing 6 posts - 1 through 6 (of 6 total)

The topic "Add custom [shortcodes] tinymce" is closed to new replies.