Skip to content

Commit 4fa45f7

Browse files
committed
upgrading dependencies
1 parent 9cee3cf commit 4fa45f7

File tree

3 files changed

+946
-364
lines changed

3 files changed

+946
-364
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
"url": "https://github.com/jpuri/html-to-draftjs.git"
88
},
99
"devDependencies": {
10-
"babel-preset-stage-0": "^6.16.0",
10+
"babel-preset-stage-0": "^6.22.0",
1111
"chai": "^3.5.0",
12-
"draft-js": "^0.9.1",
13-
"draftjs-to-html": "^0.5.0",
12+
"draft-js": "^0.10.0",
13+
"draftjs-to-html": "^0.5.1",
1414
"react": "^15.4.2",
1515
"react-dom": "^15.4.2",
16-
"react-draft-wysiwyg": "^1.5.8",
17-
"react-scripts": "0.8.5",
16+
"react-draft-wysiwyg": "^1.6.5",
17+
"react-scripts": "0.7.0",
1818
"rimraf": "^2.5.4",
19-
"webpack": "^1.14.0"
19+
"webpack": "^2.2.1"
2020
},
2121
"peerDependencies": {
2222
"draft-js": "^0.9.x"

src/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ class Playground extends Component {
3030
}
3131

3232
onInputEditorChange = (inputEditorState) => {
33-
console.log('*****', inputEditorState.getCurrentContent())
33+
console.log('into onInputEditorChange')
34+
// console.log('*****', inputEditorState.getCurrentContent())
3435
const rawContent = convertToRaw(inputEditorState.getCurrentContent());
3536
const html = draftToHtml(rawContent);
37+
console.log('html', html)
3638
const contentBlock = htmlToDraft(html);
3739
// console.log('1', contentBlock)
3840
// console.log('2', convertFromHTML(html) && convertFromHTML(html))
@@ -43,8 +45,8 @@ class Playground extends Component {
4345
inputEditorState,
4446
outputEditorState,
4547
});
46-
console.log('1', inputEditorState.getCurrentContent().getBlocksAsArray())
47-
console.log('2', contentBlock.contentBlocks)
48+
// console.log('1', inputEditorState.getCurrentContent().getBlocksAsArray())
49+
// console.log('2', contentBlock.contentBlocks)
4850
}
4951
}
5052

@@ -76,10 +78,13 @@ class Playground extends Component {
7678
<textarea
7779
disabled
7880
className="demo-content"
81+
value={this.state.inputEditorState && draftToHtml(convertToRaw(this.state.inputEditorState.getCurrentContent()))}
7982
/>
8083
</div>
8184
<div style={{ height: 200 }}>
82-
85+
<Editor
86+
editorState={this.state.outputEditorState}
87+
/>
8388
</div>
8489
</div>
8590
);

0 commit comments

Comments
 (0)