mailtoui icon indicating copy to clipboard operation
mailtoui copied to clipboard

buttonText1 doesnt work

Open salime45 opened this issue 6 years ago • 5 comments

I have this configuration, but i dont see any changes

salime45 avatar Sep 05 '19 16:09 salime45

You have the wrong syntax in the options object. You must separate each key:value pair with a comma instead of a semi-colon. Change it to this and it will work:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mailtoui-min.js" data-options='{ "buttonText2": "Outlook", "buttonText1": "Gmail" }' defer></script>

mariordev avatar Sep 05 '19 19:09 mariordev

I changed but still doesnt work, i am using this in wordpress.

salime45 avatar Sep 06 '19 07:09 salime45

Are you getting any kind of error in the console? What does your mailto link look like? Did you add the mailtoui class to the <a> tag?

mariordev avatar Sep 06 '19 16:09 mariordev

this is my link

<a class="mailtoui" href="mailto:[email protected]">[email protected]</a>

The window opens and i can customize the CSS but the data-options doesnt work

salime45 avatar Sep 07 '19 12:09 salime45

@salime45 I wonder if WP or a WP plug in is the cause of this. The data-options attribute has worked in every environment I tested in. I'll have to look further into it.

mariordev avatar Sep 20 '19 15:09 mariordev