Open prateekkalra opened 6 years ago
Hi, I would also be interested in working on this one as well. What other options do you think would be good to add?
Thanks
Anything that the user could do with the selected text. Avoid adding more sharing options(like linkedin,instagram).
I am interested in doing this. Do you think API extension to include custom options with event functions will be useful? It can probably support font awesome icons by default and developer can specify an action for the click event on the custom icon.
@sourabhbajaj Could you elaborate on what kind of custom options the user can add?
Lets say this:
var selection = new Selection();
selection.config({
translate:{
icon:'fa-language',
'click':function(text){
// Send text to Google Translate API and on return, replace the text into different language.
}
},
speak:true,
backgroundColor: 'crimson',
iconColor: '#fff',
}).init();
OR:
var selection = new Selection();
selection.config({
bounce:{
icon:'fa-language',
'click':function(text){
// Add effects to text to make the character bounce
}
},
speak:true,
backgroundColor: 'crimson',
iconColor: '#fff',
}).init();
There of course are very vague examples but it will enable developers to extend the plugin as per their requirements.
@sourabhbajaj You can work on it, but make sure the users still have the option to get a basic popover on their site with minimal code.
Perfect! Thanks.
Hiii ... I want to improve this project, i codding already an demo for a future bookmarks, if you let me permission to push it ^_^
@prateekkalra I have opened a new pull request, for this issue ( new feature ), it opens Google Translator in a popup, with the word selected, already filled in. In addition, it identifies the language of the browser and auto-select the language of the translator. https://github.com/prateekkalra/Selection-js/pull/13
@prateekkalra , would like to add print option. let me know.
@prateekkalra We can combine multiple sharing options into one share option on the popover and if the user clicks on share we can change the popover items to fb, twitter and much more. This way we can make the popover compact along with adding multiple options.
@prateekkalra Is this project still under development? I would like to work on adding a dictionary feature by using an API. Implementation would be similar to this. https://github.com/prateekkalra/Selection-js/issues/2#issuecomment-394302268
I saw that we already have feature for searching a word in a separate window in google. But i guess it would be better to show the results in an expanded div right inside the popup.
@prateekkalra Hello ! Would it be interesting to add the option to export the selected text into PDF (or other formats) to immediately get a simple document to download ?
Add more options in the popover along with the ones present.