Closed KevinBatdorf closed 1 year ago
This lets you override the text about to be copied, and also lets you fire a callback after the copy takes place (in case you wanted a custom notification)
window.cbpCopyOverride = (code, button) => { console.log('copied!', button, code) return `${code}\ntest test test`; }; window.cbpCopyCallback = (code, button) => { console.log('callback', button, code) }
Thank you! How do I use this from within the Wordpress editor? Paste it in under Advanced, Additional CSS classes?
Maybe I misunderstood what you're trying to do. Can you explain it again?
This lets you override the text about to be copied, and also lets you fire a callback after the copy takes place (in case you wanted a custom notification)