Is it possible to bundle two buttons/icons with one popclip extension? I’m trying to build an extension with two main functionalities, and I’d like to avoid creating two separate extensions if possible.
1 Like
Yes, an extension can have two or more actions. This is accomplished by including an actions array in the config.
Here’s an example snippet:
# PopClip JS + Multi-Action Example
name: Markdown Formatting
requirements: [text, paste]
actions:
- title: Markdown Bold
icon: circle filled B
javascript: popclip.pasteText('**' + popclip.input.text + '**')
- title: Markdown Italic
icon: circle filled I
javascript: popclip.pasteText('*' + popclip.input.text + '*')
Take a look at the actions documentation. If you have any specific questions, feel free to ask.
2 Likes
Thank you Nick!
I completed the extension and it works perfectly.
Can I promote it in PopClip Extensions - PopClip Forum? The extension activates an app that I built, and I want to make sure this doesn’t violate the policy of the forum.
Yes, that’s fine. Happy for you to post about your app & PopClip extension.
1 Like
Awesome, thanks for confirming