Comments (1)
This can already be done using the method appendCustomShareButtons
Here's an example using a random icon, and a link that creates an email with a placeholder email address, a subject (in this case, the page title, window.document.title
) and the body text containing the selected text and link.
Sharect.appendCustomShareButtons([{
icon: '<?xml version="1.0" encoding="iso-8859-1"?><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24" height="24" viewBox="0 0 489.776 489.776" style="enable-background:new 0 0 489.776 489.776;" xml:space="preserve"><g><path d="M469.075,64.488h-448.2c-10.3,0-18.8,7.5-20.5,17.3c-0.6,2.4-0.3,322.7-0.3,322.7c0,11.4,9.4,20.8,20.8,20.8h447.1 c11.4,0,20.8-8.3,21.8-19.8v-320.2C489.875,73.788,480.475,64.488,469.075,64.488z M404.275,106.088l-159.8,114.4l-159.8-114.4 H404.275z M40.675,384.788v-259.9l192.4,137.2c7.8,6.3,17.2,4.4,22.9,0l192.4-137.8v260.5L40.675,384.788L40.675,384.788z"/></g></svg>',
url: `mailto:email?subject=${window.document.title}&body=TEXT_SELECTION%20PAGE_URL`
}]).init()
Let me know if it solves your problem.
from sharect.
Related Issues (17)
- position is absolute to body
- On mobile, show share options in bottom bar HOT 4
- Extend the API so it's possible to add other sharing options
- Add tests and reach 100% coverage
- Change Facebook share method so appId is not required anymore
- 2.0 Docs
- Remove mobile tooltip
- Sharect in WordPress HOT 1
- Mobile responsive HOT 1
- Doesn't appear to work with Desktop Safari HOT 1
- Doesn't work with touch screens. HOT 1
- Is there a way to add callback functions to share buttons? HOT 3
- Possible to accommodate for '%' signs? HOT 2
- if "&" comes between selected text facebook post remove text after
- IE11 Problem HOT 1
- Enable this plugin only on given element or id or class not on body HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharect.