0

Is it possible to use JavaScript to dynamically add a custom button to the ribbon?

I want to add a button next to the upload document button in a document library.

Any ideas or code how to do that?

2 Answers 2

1

Based on the hashtag 2013 I guess your question is for Sharepoint 2013?

Back in time I created a JS library to do what you're looking for: https://github.com/Aymkdn/RibbonPlus

2
  • This works most of the time. Sometimes the button is not added. Any idea how to fix that?
    – jlai
    Apr 19, 2021 at 14:00
  • I replied to your issue on Github.
    – AymKdn
    Apr 19, 2021 at 17:56
2

You can add button to the ribbon using Custom Actions.

Check below references for more information & code:

  1. Create Ribbon Custom Action Using JavaScript Object Model In SharePoint 2016 And Office 365

  2. Create custom actions to deploy with SharePoint Add-ins - Documentation

  3. How create custom action button on sharepoint online command bar without spfx?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.