Text to Markdown Task

I am new to PopClip, and can’t seem to find an extension that will append highlighted text.

I would like to have PopClip append - [ ] to highlighted text, to create a Markdown task.

I looked at some other Markdown items in the forum, and tried this:

# popclip
name: MD Task 
icon: checkbox
javascript: ('- [ ] ' + popclip.input.text)

but it doesn’t do anything.

I’m probably missing something fairly obvious here, but I’d like to learn to create extensions for things like this. What am I missing?
Thanks for your help!

1 Like

It’s almost right, but it’s missing the method name popclip.pasteText. Here is a corrected version:

# popclip
name: MD Task 
icon: iconify:mdi:checkbox-outline
javascript: popclip.pasteText('- [ ] ' + popclip.input.text)

I also changed your icon to one I found by searching on the Iconify website.

Welcome to the forum @k8seren, don’t hesitate to ask if you have any more questions.