Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erdembircan/selection-popup
A library to add popup menus at text selections.
https://github.com/erdembircan/selection-popup
javascript javascript-library module npm popup selection
Last synced: about 1 month ago
JSON representation
A library to add popup menus at text selections.
- Host: GitHub
- URL: https://github.com/erdembircan/selection-popup
- Owner: erdembircan
- License: mit
- Created: 2017-11-21T18:39:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T04:42:33.000Z (about 7 years ago)
- Last Synced: 2024-08-09T17:34:33.675Z (5 months ago)
- Topics: javascript, javascript-library, module, npm, popup, selection
- Language: JavaScript
- Homepage: https://erdembircan.github.io/selection-popup/
- Size: 37.1 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# selection-popup [![Build Status](https://travis-ci.org/erdembircan/selection-popup.svg?branch=master)](https://travis-ci.org/erdembircan/selection-popup)
---
A library to add popup menus at text selections.
[Demo page](https://erdembircan.github.io/selection-popup/)---
## Installation
`npm install selection-popup`---
## Usage
```
const selectionPop = require('selection-popup)selectionPop(['share', '
', '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 styles for customization---
## License
Copyright © 2017, Erdem Bircan. Released under the MIT License.