Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed react warnings #65

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [ "react", "es2015" ]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
build/
node_modules/
example/main*
.publish
61 changes: 9 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,35 @@
# react-tinymce
# react-mce

React TinyMCE component

## Installing

```bash
$ npm install react-tinymce
$ npm install react-mce
```

## Demo

http://instructure-react.github.io/react-tinymce/
http://janstuemmel.github.io/react-mce/

## Example

```js
import React from 'react';
import ReactDOM from 'react-dom';
import TinyMCE from 'react-tinymce';

const App = React.createClass({
handleEditorChange(e) {
console.log(e.target.getContent());
},

render() {
return (
<TinyMCE
content="<p>This is the initial content of the editor</p>"
config={{
plugins: 'autolink link image lists print preview',
toolbar: 'undo redo | bold italic | alignleft aligncenter alignright'
}}
onChange={this.handleEditorChange}
/>
);
}
});

ReactDOM.render(<App/>, document.getElementById('container'));
```
see [example.js](example/example.js)

## Dependency

This component depends on `tinymce` being globally accessible.

```html
<script src="//tinymce.cachefly.net/4.2/tinymce.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.4/tinymce.min.js"></script>
```

## Contributing

install your dependencies:

`npm install`

rackt-cli depends on a version of babel-eslint that will not run successfully with
the rest of this project. Until an upgrade is available, after installing,
edit "node_modules/rackt-cli/package.json"
and update it's babel-eslint to at least 4.1.7. Then `npm install` in the rackt
directory, and return to project root. From here on you need to use the
rackt version in node modules, so either alias "rackt" to it's bin, or
just path each command into node_modules/.bin like below.

To make sure the linter is happy and the functional tests run, execute:

`./node_modules/.bin/rackt test`

To release, you'll need to be an npm owner for react-tinymce, and already
have your machine currently authed with `npm adduser`

https://docs.npmjs.com/cli/adduser

use `./node_modules/.bin/rackt release`
```sh
# runs the karma/mocha testsuite on phantomjs
npm test
```

## License

Expand Down
Loading