https://github.com/globocom/megadraft-related-articles-plugin
Related articles plugin for Megadraft text editor
https://github.com/globocom/megadraft-related-articles-plugin
draft-js javascript megadraft megadraft-plugin react reactjs
Last synced: 6 months ago
JSON representation
Related articles plugin for Megadraft text editor
- Host: GitHub
- URL: https://github.com/globocom/megadraft-related-articles-plugin
- Owner: globocom
- License: mit
- Created: 2016-06-29T17:18:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T04:51:50.000Z (about 3 years ago)
- Last Synced: 2025-04-06T08:36:38.581Z (11 months ago)
- Topics: draft-js, javascript, megadraft, megadraft-plugin, react, reactjs
- Language: JavaScript
- Size: 1.61 MB
- Stars: 10
- Watchers: 44
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Related Articles Plugin - Megadraft Plugin
## Usage
Include the plugin in the `plugins` prop of your `Megadraft` instance.
```js
import React from "react";
import ReactDOM from "react-dom";
import {MegadraftEditor} from "megadraft";
import plugin from "related-articles-plugin";
class Example extends React.Component {
render(){
return (
);
}
}
ReactDOM.render(, document.getElementById("container"));
```
## Contributing
Install, run, test.
```
# Install npm dependencies
make setup
# Gulp dev-server task with webpack + sass running on http://localhost:8080/
make run
# Run mocha tests + eslint
make test
```
If you're constantly running tests, there's a faster alternative using mocha's
watch feature:
```
make watch_unit
```
## Releasing
There's a `prepublish` script entry on `package.json` that runs build tasks
before publishing the package.
```
npm publish
```
## Third Party
The sample plugin uses the extension icon from https://design.google.com/icons/
under [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).