jodit-react
Advanced tools
Comparing version 1.0.14 to 1.0.16
@@ -167,2 +167,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
this.editor = new _jodit2.default(this.refs.element, this.props.config); | ||
if (this.props.editorRef && typeof this.props.editorRef === 'function') { | ||
this.props.editorRef(this.editor); | ||
} | ||
this.editor.value = this.state.value; | ||
@@ -217,2 +222,2 @@ this.editor.events.on('change', this.changeListener); | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBiN2YwMzEyOWEwZTU0ZjZmMGJhZCIsIndlYnBhY2s6Ly8vLi9zcmMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL0pvZGl0RWRpdG9yLmpzIiwid2VicGFjazovLy9leHRlcm5hbCB7XCJyb290XCI6XCJSZWFjdFwiLFwiY29tbW9uanMyXCI6XCJyZWFjdFwiLFwiY29tbW9uanNcIjpcInJlYWN0XCIsXCJhbWRcIjpcInJlYWN0XCJ9Iiwid2VicGFjazovLy9leHRlcm5hbCBcImpvZGl0XCIiXSwibmFtZXMiOlsiSm9kaXRFZGl0b3IiLCJwcm9wcyIsIm9sZENvbmZpZyIsImNoYW5nZUxpc3RlbmVyIiwidmFsdWUiLCJzdGF0ZSIsIm9uQ2hhbmdlIiwiY29uZmlnIiwiY3JlYXRlRWRpdG9yIiwiZWRpdG9yIiwiZGVzdHJ1Y3QiLCJyZWZzIiwiZWxlbWVudCIsImV2ZW50cyIsIm9uIiwiSlNPTiIsInN0cmluZ2lmeSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0F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m9wcy52YWx1ZTtcclxuICAgIH1cclxuXHJcbiAgICByZW5kZXIoKSB7XHJcbiAgICAgICAgcmV0dXJuIDx0ZXh0YXJlYSByZWY9XCJlbGVtZW50XCI+PC90ZXh0YXJlYT5cclxuICAgIH1cclxufVxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9Kb2RpdEVkaXRvci5qcyIsIm1vZHVsZS5leHBvcnRzID0gX19XRUJQQUNLX0VYVEVSTkFMX01PRFVMRV8yX187XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gZXh0ZXJuYWwge1wicm9vdFwiOlwiUmVhY3RcIixcImNvbW1vbmpzMlwiOlwicmVhY3RcIixcImNvbW1vbmpzXCI6XCJyZWFjdFwiLFwiYW1kXCI6XCJyZWFjdFwifVxuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCJtb2R1bGUuZXhwb3J0cyA9IF9fV0VCUEFDS19FWFRFUk5BTF9NT0RVTEVfM19fO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIGV4dGVybmFsIFwiam9kaXRcIlxuLy8gbW9kdWxlIGlkID0gM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9 |
{ | ||
"name": "jodit-react", | ||
"version": "1.0.14", | ||
"version": "1.0.16", | ||
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser", | ||
@@ -19,2 +19,3 @@ "main": "build/jodit-react.js", | ||
"dependencies": { | ||
"@types/react": "^16.3.14", | ||
"jodit": "^3.1.31" | ||
@@ -21,0 +22,0 @@ }, |
@@ -7,3 +7,3 @@ # React Jodit WYSIWYG Editor | ||
React wrapper for Jodit | ||
React wrapper for [Jodit](https://xdsoft.net/jodit/) | ||
@@ -51,14 +51,21 @@ ## Installation | ||
updateContent(value) { | ||
updateContent = (value) => { | ||
this.setState({content:value}) | ||
} | ||
/** | ||
* @property Jodit jodit instance of native Jodit | ||
*/ | ||
jodit; | ||
setRef = jodit => this.jodit = jodit; | ||
config = { | ||
readonly: false // all options from https://xdsoft.net/jodit/doc/ | ||
} | ||
render() { | ||
return ( | ||
<JoditEditor | ||
editorRef={this.setRef} | ||
value={this.state.content} | ||
config={{ | ||
readonly: false // all options from https://xdsoft.net/jodit/doc/ | ||
}} | ||
onChange={this.updateContent.bind(this)} | ||
config={this.config} | ||
onChange={this.updateContent} | ||
/> | ||
@@ -65,0 +72,0 @@ ); |
@@ -40,2 +40,7 @@ import React, { Component } from 'react'; | ||
this.editor = new Jodit(this.refs.element, this.props.config); | ||
if (this.props.editorRef && typeof this.props.editorRef === 'function') { | ||
this.props.editorRef(this.editor); | ||
} | ||
this.editor.value = this.state.value; | ||
@@ -42,0 +47,0 @@ this.editor.events.on('change', this.changeListener); |
33393
15
537
79
4
+ Added@types/react@^16.3.14
+ Added@types/prop-types@15.7.14(transitive)
+ Added@types/react@16.14.62(transitive)
+ Added@types/scheduler@0.16.8(transitive)
+ Addedcsstype@3.1.3(transitive)