...
- User inputs a link,
- clicks Share button,
- chooses an application to share it to.
This is the code:
Code Block | ||||
---|---|---|---|---|
| ||||
const share = function(){
navigator.share({
title: 'mobsted.com',
text: 'look at this: ' + MBST.ht("Backendname:text_input_share_link").properties.value,
})
.then(() => console.log('Successful share'))
.catch((error) => console.log('Error sharing', error));
}
if (navigator.share) {
MBST.addActionListener("button_share_link", share)
} |
Wiki Markup |
---|
const share = function(){ navigator.share({ title: 'mobsted.com', text: 'look at this: ' + MBST.ht("Backendname:text_input_share_link").properties.value, }) .then(() => console.log('Successful share')) .catch((error) => console.log('Error sharing', error)); } if (navigator.share) { MBST.addActionListener("button_share_link", share) } |
...