Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 22f60d4

Browse files
committed
Fork
1 parent 2b96c0c commit 22f60d4

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Atsushi NAGASE
3+
Copyright (c) 2017 Space Program Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
draft-js-markdown-shortcuts-plugin
1+
draft-js-markdown-plugin
22
==================================
33

4-
[![CircleCI](https://circleci.com/gh/ngs/draft-js-markdown-shortcuts-plugin.svg?style=svg)](https://circleci.com/gh/ngs/draft-js-markdown-shortcuts-plugin)
5-
[![npm](https://img.shields.io/npm/v/draft-js-markdown-shortcuts-plugin.svg)][npm]
6-
[![Coverage Status](https://coveralls.io/repos/github/ngs/draft-js-markdown-shortcuts-plugin/badge.svg?branch=master)](https://coveralls.io/github/ngs/draft-js-markdown-shortcuts-plugin?branch=master)
4+
[![npm](https://img.shields.io/npm/v/draft-js-markdown-plugin.svg)][npm]
5+
<!-- [![Coverage Status](https://coveralls.io/repos/github/withspectrum/draft-js-markdown-plugin/badge.svg?branch=master)](https://coveralls.io/github/withspectrum/draft-js-markdown-plugin?branch=master) -->
76

87
A [DraftJS] plugin for supporting Markdown syntax shortcuts
98

@@ -13,36 +12,31 @@ This plugin works with [DraftJS Plugins] wrapper component.
1312

1413
[View Demo][Demo]
1514

16-
Usage
17-
-----
15+
## Usage
1816

1917
```sh
20-
npm i --save draft-js-markdown-shortcuts-plugin
18+
npm i --save draft-js-markdown-plugin
2119
```
2220

2321
then import from your editor component
2422

2523
```js
26-
import createMarkdownShortcutsPlugin from 'draft-js-markdown-shortcuts-plugin';
24+
import createMarkdownPlugin from 'draft-js-markdown-plugin';
2725
```
2826

29-
Example
30-
-------
27+
### Full Example
3128

3229
```js
3330
import React, { Component } from 'react';
3431
import Editor from 'draft-js-plugins-editor';
35-
import createMarkdownShortcutsPlugin from 'draft-js-markdown-shortcuts-plugin';
32+
import createMarkdownPlugin from 'draft-js-markdown-plugin';
3633
import { EditorState } from 'draft-js';
3734

38-
const plugins = [
39-
createMarkdownShortcutsPlugin()
40-
];
41-
4235
export default class DemoEditor extends Component {
4336

4437
state = {
4538
editorState: EditorState.createEmpty(),
39+
plugins: [createMarkdownPlugin()]
4640
};
4741

4842
onChange = (editorState) => {
@@ -56,20 +50,25 @@ export default class DemoEditor extends Component {
5650
<Editor
5751
editorState={this.state.editorState}
5852
onChange={this.onChange}
59-
plugins={plugins}
53+
plugins={this.state.plugins}
6054
/>
6155
);
6256
}
6357
}
6458
```
6559

66-
License
67-
-------
60+
## License
61+
62+
Licensed under the MIT license, Copyright Ⓒ 2017 Space Program Inc. This plugin is forked from the excellent [`draft-js-markdown-shortcuts-plugin`](https://github.com/ngs/draft-js-markdown-shortcuts-plugin) by [Atsushi Nagase](https://github.com/ngs).
63+
64+
See [LICENSE] for the full license text.
65+
66+
## Why fork the `markdown-shortcuts-plugin`?
6867

69-
MIT. See [LICENSE]
68+
Writing is a core part of our app, and while the `markdown-shortcuts-plugin` is awesome and battle-tested there are a few opinionated things we wanted to do differently. Rather than bother [@ngs](https://github.com/ngs) with tons of PRs, we figured it'd be better to own that core part of our experience fully.
7069

71-
[Demo]: https://ngs.github.io/draft-js-markdown-shortcuts-plugin
70+
[Demo]: https://ngs.github.io/draft-js-markdown-plugin
7271
[DraftJS]: https://facebook.github.io/draft-js/
7372
[DraftJS Plugins]: https://github.com/draft-js-plugins/draft-js-plugins
7473
[LICENSE]: ./LICENSE
75-
[npm]: https://www.npmjs.com/package/draft-js-markdown-shortcuts-plugin
74+
[npm]: https://www.npmjs.com/package/draft-js-markdown-plugin

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "draft-js-markdown-shortcuts-plugin",
3-
"version": "0.3.0",
4-
"description": "A DraftJS plugin for supporting Markdown syntax shortcuts",
2+
"name": "draft-js-markdown-plugin",
3+
"version": "0.0.1",
4+
"description": "A DraftJS plugin for supporting Markdown syntax shortcuts, fork of draft-js-markdown-shortcuts-plugin",
55
"main": "lib/index.js",
66
"scripts": {
77
"eslint": "node_modules/.bin/eslint .",
@@ -28,20 +28,20 @@
2828
},
2929
"repository": {
3030
"type": "git",
31-
"url": "git+https://github.com/ngs/draft-js-markdown-shortcuts-plugin.git"
31+
"url": "git+https://github.com/withspectrum/draft-js-markdown-plugin.git"
3232
},
3333
"keywords": [
3434
"draftjs",
3535
"editor",
3636
"plugin",
3737
"markdown"
3838
],
39-
"author": "Atsushi Nagase",
39+
"author": "Max Stoiber <contact@mxstbr.com>",
4040
"license": "MIT",
4141
"bugs": {
42-
"url": "https://github.com/ngs/draft-js-markdown-shortcuts-plugin/issues"
42+
"url": "https://github.com/withspectrum/draft-js-markdown-plugin/issues"
4343
},
44-
"homepage": "https://github.com/ngs/draft-js-markdown-shortcuts-plugin#readme",
44+
"homepage": "https://github.com/withspectrum/draft-js-markdown-plugin#readme",
4545
"devDependencies": {
4646
"autoprefixer": "^6.5.3",
4747
"babel-cli": "^6.18.0",

0 commit comments

Comments
 (0)