Skip to content

Commit 8cdeceb

Browse files
committedMar 22, 2016
Merge pull request draft-js-plugins#91 from draft-js-plugins/move-sticker-plugin
🦄 Move sticker plugin
2 parents ef755c4 + 1a25330 commit 8cdeceb

19 files changed

+82
-24
lines changed
 

‎.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ lib/**
33
draft-js-hashtag-plugin/lib/**
44
draft-js-linkify-plugin/lib/**
55
draft-js-mention-plugin/lib/**
6+
draft-js-sticker-plugin/lib/**
67
scripts/**
78
docs/public/**

‎.jscsrc

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"draft-js-hashtag-plugin/lib/**",
1111
"draft-js-linkify-plugin/lib/**",
1212
"draft-js-mention-plugin/lib/**",
13+
"draft-js-sticker-plugin/lib/**",
1314
"lib/**"
1415
]
1516
}

‎docs/webpack.config.base.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
'draft-js-hashtag-plugin': path.join(__dirname, '..', 'draft-js-hashtag-plugin', 'src'),
1010
'draft-js-linkify-plugin': path.join(__dirname, '..', 'draft-js-linkify-plugin', 'src'),
1111
'draft-js-mention-plugin': path.join(__dirname, '..', 'draft-js-mention-plugin', 'src'),
12-
'draft-js-sticker-plugin': path.join(__dirname, '..', 'src', 'stickerPlugin'),
12+
'draft-js-sticker-plugin': path.join(__dirname, '..', 'draft-js-sticker-plugin', 'src'),
1313
'draft-js-undo-plugin': path.join(__dirname, '..', 'src', 'historyPlugin'),
1414
react: path.join(__dirname, 'node_modules', 'react'),
1515
},
@@ -31,6 +31,7 @@ module.exports = {
3131
path.join(__dirname, '..', 'draft-js-hashtag-plugin', 'src'),
3232
path.join(__dirname, '..', 'draft-js-linkify-plugin', 'src'),
3333
path.join(__dirname, '..', 'draft-js-mention-plugin', 'src'),
34+
path.join(__dirname, '..', 'draft-js-sticker-plugin', 'src'),
3435
],
3536
}, {
3637
test: /\.css$/,
@@ -40,6 +41,7 @@ module.exports = {
4041
path.join(__dirname, '..', 'draft-js-hashtag-plugin', 'src'),
4142
path.join(__dirname, '..', 'draft-js-linkify-plugin', 'src'),
4243
path.join(__dirname, '..', 'draft-js-mention-plugin', 'src'),
44+
path.join(__dirname, '..', 'draft-js-sticker-plugin', 'src'),
4345
path.join(__dirname, 'client/components'),
4446
],
4547
}, {

‎draft-js-sticker-plugin/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/*

‎draft-js-sticker-plugin/.npmignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Dependency directory
2+
# Commenting this out is preferred by some people, see
3+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
4+
node_modules
5+
6+
# sources
7+
/src/
8+
9+
# NPM debug
10+
npm-debug.log

‎draft-js-sticker-plugin/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Sticker Plugin
2+
3+
[![Unicorn Approved](https://img.shields.io/badge/draft--js-%E2%99%A5_unicorns-ff69b4.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAACLlBMVEUAAAAAAAAA%2F%2F%2F%2F%2F%2F8AgICAgID%2FgP9VqlWqqqpAQEBAQICAgIC%2Fv78AAACZZpn%2FzP8AAABVVYBNTU0AAAAAAAAAAAAAAAAAABQAAAAAAAAAAAA8PEpXQ0oAAABpYmJ5c3kAAAAAAAAAAAAAAACZe6a7rr8ASxubeKKPj4tjTU1XKVdMfIFTM2xgQnihpZ9%2BWE7Jtc1CR3pbOWZTOVNWI1ZkiW54e3WHaFmbjnuUr69%2BW12cc3evi4%2B%2BmsHjx%2BWcv8SikK9JQmDWvNixiJDApL%2F14fVZRmuZiqaZkqediKTUudW0jaGEmJGwg4qxho6tt8RrT3WCUYG4mqR5i5rexd9gV4R5VHjNsdLOrtL%2F%2F%2F%2Bgiqah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HPcyN9OymcpsmghGgW1Pgt03wGQso2jFDxlvdf%2FCu4%2FoVC3NL4TyRCGT4rNLhG%2B46yMRykvKLgts6QAAAABJRU5ErkJggg%3D%3D)](https://www.youtube.com/watch?v=9auOCbH5Ns4)
4+
5+
*This is a plugin for the `draft-js-plugins-editor`.*
6+
7+
This plugin allows you to add stickers to your editor!
8+
9+
Usage:
10+
11+
```js
12+
import createStickerPlugin from 'draft-js-sticker-plugin';
13+
14+
const stickerPlugin = createStickerPlugin({ stickers });
15+
const { StickerSelect } = stickerPlugin;
16+
```
17+
18+
#### Exported functions
19+
20+
| Props | Description
21+
| -----------------------------------------------|------------:|
22+
| add(editorState: Object, stickerId: any) | add a Sticker ContentBlock after the current Selection|
23+
| remove(editorState: Object, blockKey: String) | removes a Sticker ContentBlock|
24+
| Sticker | the default Sticker Component |
25+
| StickerSelect | a basic StickerSelector |

‎draft-js-sticker-plugin/package.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "draft-js-hashtag-pluin",
3+
"version": "0.0.0",
4+
"description": "Sticker Plugin for DraftJS",
5+
"author": {
6+
"name": "Nik Graf",
7+
"email": "nik@nikgraf.com",
8+
"url": "http://www.nikgraf.com"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
13+
},
14+
"main": "lib/index.js",
15+
"keywords": [
16+
"editor",
17+
"wysiwyg",
18+
"draft",
19+
"react",
20+
"ux",
21+
"components",
22+
"widget",
23+
"react-component"
24+
],
25+
"peerDependencies": {
26+
"react": ">=0.14.0 || 15.0.0-rc.2",
27+
"react-dom": ">=0.14.0 || 15.0.0-rc.2"
28+
},
29+
"scripts": {
30+
"build": "BABEL_ENV=production ../node_modules/.bin/babel --out-dir='lib' --ignore='__tests__/*' src",
31+
"prepublish": "npm run build"
32+
},
33+
"license": "MIT",
34+
"dependencies": {
35+
"decorate-component-with-props": "^1.0.2",
36+
"draft-js": "^0.2.2",
37+
"find-with-regex": "^1.0.2",
38+
"immutable": "^3.7.6",
39+
"union-class-names": "^1.0.0"
40+
}
41+
}
File renamed without changes.

‎src/stickerPlugin/README.md

-23
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.