# react-frame-aware-selection-plugin

> Modified version of React SelectEventPlugin with fixes related to iframe rendering.

Latest version **2.0.2** (published 2017-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-frame-aware-selection-plugin
pnpm add react-frame-aware-selection-plugin
yarn add react-frame-aware-selection-plugin
bun add react-frame-aware-selection-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2017-10-24 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Vladimir |
| Maintainers | vleletko |
| Keywords | react, selection, iframe |

## Links

- npm: https://www.npmjs.com/package/react-frame-aware-selection-plugin
- Repository: https://github.com/vleletko/react-frame-aware-selection-plugin
- Issues: https://github.com/vleletko/react-frame-aware-selection-plugin/issues
- npm.io page: https://npm.io/package/react-frame-aware-selection-plugin

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2017-10-24
- 2.0.1 — 2017-10-24
- 2.0.0 — 2017-10-01
- 1.0.0 — 2017-01-19
- 0.0.5 — 2016-08-12
- 0.0.4 — 2016-08-12
- 0.0.3 — 2016-08-12
- 0.0.2 — 2016-08-10
- 0.0.1 — 2016-08-02

## README

# react-frame-aware-selection-plugin

Modified version of React SelectEventPlugin with fixes related to iframe rendering. 

[![Travis build status](http://img.shields.io/travis/vleletko/react-frame-aware-selection-plugin.svg?style=flat)](https://travis-ci.org/vleletko/react-frame-aware-selection-plugin)
[![Dependency Status](https://david-dm.org/vleletko/react-frame-aware-selection-plugin.svg)](https://david-dm.org/vleletko/react-frame-aware-selection-plugin)
[![devDependency Status](https://david-dm.org/vleletko/react-frame-aware-selection-plugin/dev-status.svg)](https://david-dm.org/vleletko/react-frame-aware-selection-plugin#info=devDependencies)
[![npm version](https://badge.fury.io/js/react-frame-aware-selection-plugin.svg)](https://badge.fury.io/js/react-frame-aware-selection-plugin)

1. [Usage](#usage)
2. [Motivation](#motivation)
3. [How it works](#how-it-works)

## Usage

1. Add npm package

    Latest
    
    `npm install react-frame-aware-selection-plugin@2.0.0 --save `
    
    React >= 15.4 && < 16.0.0

    `npm install react-frame-aware-selection-plugin@1.0.0 --save `
    
    React < 15.4
    
    `npm install react-frame-aware-selection-plugin@0.0.5 --save `

2. In you app entry point:

    ```js
    import React from 'react'
    import ReactDOM from 'react-dom'
    import injector from 'react-frame-aware-selection-plugin'
    injector();
    ```

## Motivation 

Current React version does not support onSelect event if component is embedded to iFrame.
Consider following code: 

```js
import Frame from 'react-frame-component'

const AwesomeFramedComponent = ({ onSelect }) => (
  <Frame>
    <div contentEditable="true" onSelect={onSelect}></div>
  </Frame>
)
```

In such situation `onSelect` callback will not be fired. 
This library will fix this behaviour. 
  
  
### Hot it works
Library will replace `SelectEventPlugin` in `EventPluginRegistry` with fixed version.

---
_Source: https://npm.io/package/react-frame-aware-selection-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
