UNPKG

4.18 kBMarkdownView Raw
1# rc-editor-core
2---
3
4React EditorCore Component
5
6
7[![NPM version][npm-image]][npm-url]
8[![build status][travis-image]][travis-url]
9[![Test coverage][coveralls-image]][coveralls-url]
10[![gemnasium deps][gemnasium-image]][gemnasium-url]
11[![node version][node-image]][node-url]
12[![npm download][download-image]][download-url]
13[![Sauce Test Status](https://saucelabs.com/buildstatus/rc-editor-core)](https://saucelabs.com/u/rc-editor-core)
14
15[![Sauce Test Status](https://saucelabs.com/browser-matrix/rc-editor-core.svg)](https://saucelabs.com/u/rc-editor-core)
16
17[npm-image]: http://img.shields.io/npm/v/rc-editor-core.svg?style=flat-square
18[npm-url]: http://npmjs.org/package/rc-editor-core
19[travis-image]: https://img.shields.io/travis/react-component/editor-core.svg?style=flat-square
20[travis-url]: https://travis-ci.org/react-component/editor-core
21[coveralls-image]: https://img.shields.io/coveralls/react-component/editor-core.svg?style=flat-square
22[coveralls-url]: https://coveralls.io/r/react-component/editor-core?branch=master
23[gemnasium-image]: http://img.shields.io/gemnasium/react-component/editor-core.svg?style=flat-square
24[gemnasium-url]: https://gemnasium.com/react-component/editor-core
25[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
26[node-url]: http://nodejs.org/download/
27[download-image]: https://img.shields.io/npm/dm/rc-editor-core.svg?style=flat-square
28[download-url]: https://npmjs.org/package/rc-editor-core
29
30
31## Browser Support
32
33| ![IE / Edge](https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/edge.png) <br /> IE / Edge | ![Firefox](https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/firefox.png) <br /> Firefox | ![Chrome](https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/chrome.png) <br /> Chrome | ![Safari](https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/safari.png ) <br /> Safari | ![iOS Safari](https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/safari-ios.png) <br />iOS Safari | ![Chrome for Anroid](https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/chrome-android.png) <br/> Chrome for Android |
34| --------- | --------- | --------- | --------- | --------- | --------- |
35| IE11, Edge [1, 2]| last 2 versions| last 2 versions| last 2 versions| not fully supported [3] | not fully supported [3]
36
37[1] May need a shim or a polyfill for some syntax used in Draft.js ([docs](https://draftjs.org/docs/advanced-topics-issues-and-pitfalls.html#polyfills)).
38
39[2] IME inputs have known issues in these browsers, especially Korean ([docs](https://draftjs.org/docs/advanced-topics-issues-and-pitfalls.html#ime-and-internet-explorer)).
40
41[3] There are known issues with mobile browsers, especially on Android ([docs](https://draftjs.org/docs/advanced-topics-issues-and-pitfalls.html#mobile-not-yet-supported)).
42
43## Screenshots
44
45<img src="https://zos.alipayobjects.com/rmsportal/iNbBdYhHdLxfnCT.png" width="288"/>
46
47
48## Development
49
50```
51npm install
52npm start
53```
54
55## Example
56
57http://localhost:8003/examples/
58
59
60online example: http://react-component.github.io/editor-core/
61
62
63## Feature
64
65* support ie8,ie8+,chrome,firefox,safari
66
67
68## install
69
70
71[![rc-editor-core](https://nodei.co/npm/rc-editor-core.png)](https://npmjs.org/package/rc-editor-core)
72
73
74## Usage
75
76```js
77var EditorCore = require('rc-editor-core');
78var React = require('react');
79React.render(<EditorCore />, container);
80```
81
82## API
83
84### props
85
86<table class="table table-bordered table-striped">
87 <thead>
88 <tr>
89 <th style="width: 100px;">name</th>
90 <th style="width: 50px;">type</th>
91 <th style="width: 50px;">default</th>
92 <th>description</th>
93 </tr>
94 </thead>
95 <tbody>
96 <tr>
97 <td>className</td>
98 <td>String</td>
99 <td></td>
100 <td>additional css class of root dom node</td>
101 </tr>
102 </tbody>
103</table>
104
105
106## Test Case
107
108```
109npm test
110npm run chrome-test
111```
112
113## Coverage
114
115```
116npm run coverage
117```
118
119open coverage/ dir
120
121## License
122
123rc-editor-core is released under the MIT license.