mariordev / mailtoui

A simple way to enhance your mailto links with a convenient user interface.
https://mailtoui.com
MIT License
192 stars 12 forks source link

buttonText1 doesnt work #10

Open salime45 opened 5 years ago

salime45 commented 5 years ago

I have this configuration, but i dont see any changes

mariordev commented 5 years ago

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/mailtoui@1.0.2/dist/mailtoui-min.js" data-options='{ "buttonText2": "Outlook", "buttonText1": "Gmail" }' defer></script>
salime45 commented 5 years ago

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

mariordev commented 5 years ago

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?

salime45 commented 5 years ago

this is my link

<a class="mailtoui" href="mailto:alopez@ridenow.site">alopez@ridenow.site</a>

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

mariordev commented 5 years ago

@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.