Select-popup is a JavaScript plugin to create a popup that is displayed at the top of your text selection. Perfect for creating a social popup post that allows users to share their text selections on social networks.
It can also be used as a built-in editor that allows users to edit text selections.
Default popover items:
- Twitter share link.
- Facebook share link.
- Search on Google.
- Copy link.
- Speak link.
How to make use of it:
Installation
npm install selection-popup
Usage
const selectionPop = require('selection-popup) selectionPop(['share', '<i class="fa fa-twitter" aria-hidden="true"></i> ', 'log'], [shareFunc, tweetFunc, function(e){ console.log('selected item: ' + e) } ],{style: 'background-color:yellow'});
API
selectionPop([items],[funcs] ,[options])
add a popup menu to document
items (required)
Type: array
, String
(for single item)
funcs (required)
Type: array
, String
(for single item) functions for onClick actions of the appropriate items
options (optional)
Type: object
[style]: String
an override style for customization
customizable popover on text selections, selection-popup Plugin/Github
See Demo And Download
Official Website(erdembircan): Click Here
This superior jQuery/javascript plugin is developed by erdembircan. For extra advanced usage, please go to the official website.