react-froala-wysiwyg
Advanced tools
Comparing version 2.5.1 to 2.6.0
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorA=e(require("react")):t.FroalaEditorA=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(4)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorA",mixins:[o],render:function(){return n.createElement("a",{ref:"el"},this.props.children)}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorA=e(require("react")):t.FroalaEditorA=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(4)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("a",{ref:"el"},this.props.children)}});t.exports=s}])}); |
@@ -67,8 +67,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorA = React.createClass({ | ||
displayName: 'FroalaEditorA', | ||
var FroalaEditorA = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -75,0 +74,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorButton=e(require("react")):t.FroalaEditorButton=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(5)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorButton",mixins:[o],render:function(){return n.createElement("button",{ref:"el"},this.props.children)}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorButton=e(require("react")):t.FroalaEditorButton=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(5)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("button",{ref:"el"},this.props.children)}});t.exports=s}])}); |
@@ -333,8 +333,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorButton = React.createClass({ | ||
displayName: 'FroalaEditorButton', | ||
var FroalaEditorButton = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -341,0 +340,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorImg=e(require("react")):t.FroalaEditorImg=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(6)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorImg",mixins:[o],render:function(){return n.createElement("img",{ref:"el"})}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorImg=e(require("react")):t.FroalaEditorImg=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(6)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("img",{ref:"el"})}});t.exports=s}])}); |
@@ -334,8 +334,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorImg = React.createClass({ | ||
displayName: 'FroalaEditorImg', | ||
var FroalaEditorImg = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -342,0 +341,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorInput=e(require("react")):t.FroalaEditorInput=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(7)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorInput",mixins:[o],render:function(){return n.createElement("input",{ref:"el"})}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorInput=e(require("react")):t.FroalaEditorInput=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(7)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("input",{ref:"el"})}});t.exports=s}])}); |
@@ -335,8 +335,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorInput = React.createClass({ | ||
displayName: 'FroalaEditorInput', | ||
var FroalaEditorInput = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -343,0 +342,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.FroalaEditorView=t(require("react")):e.FroalaEditorView=t(e.React)}(this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var i=r[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){e.exports=r(8)},1:function(t,r){t.exports=e},8:function(e,t,r){"use strict";var o=r(1),i=o.createClass({displayName:"FroalaEditorView",defaultTag:"div",getTrustedHtml:function(){return{__html:this.props.model}},render:function(){return this.tag=this.props.tag||this.defaultTag,o.createElement(this.tag,{className:"fr-view",dangerouslySetInnerHTML:this.getTrustedHtml()})}});e.exports=i}})}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.FroalaEditorView=t(require("react")):e.FroalaEditorView=t(e.React)}(this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){e.exports=r(8)},1:function(t,r){t.exports=e},8:function(e,t,r){"use strict";var o=r(1),n=r(!function(){var e=new Error('Cannot find module "create-react-class"');throw e.code="MODULE_NOT_FOUND",e}()),i=n({defaultTag:"div",getTrustedHtml:function(){return{__html:this.props.model}},render:function(){return this.tag=this.props.tag||this.defaultTag,o.createElement(this.tag,{className:"fr-view",dangerouslySetInnerHTML:this.getTrustedHtml()})}});e.exports=i}})}); |
@@ -78,7 +78,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorView = React.createClass({ | ||
displayName: 'FroalaEditorView', | ||
var FroalaEditorView = createReactClass({ | ||
defaultTag: 'div', | ||
@@ -85,0 +84,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.index=e(require("react")):t.index=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(3)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditor",mixins:[o],render:function(){return n.createElement(this.tag,{ref:"el"},this.props.children)}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.index=e(require("react")):t.index=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(3)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement(this.tag,{ref:"el"},this.props.children)}});t.exports=s}])}); |
@@ -337,7 +337,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditor = React.createClass({ | ||
displayName: 'FroalaEditor', | ||
var FroalaEditor = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -344,0 +343,0 @@ render: function render() { |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -14,3 +15,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
config: { | ||
@@ -17,0 +18,0 @@ placeholderText: 'Add a Title', |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -15,3 +16,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
getInitialState: function() { | ||
@@ -18,0 +19,0 @@ return {content: '<span>My Document\'s Title</span>'}; |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -15,3 +16,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
getInitialState: function() { | ||
@@ -18,0 +19,0 @@ return {content: {innerHTML: 'Click Me'}}; |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -15,3 +16,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
config: { | ||
@@ -18,0 +19,0 @@ reactIgnoreAttrs: ['tmpattr'] |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -15,3 +16,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
getInitialState: function() { | ||
@@ -18,0 +19,0 @@ return {content: {placeholder: 'I am an input!'}}; |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -15,3 +16,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
getInitialState: function() { | ||
@@ -18,0 +19,0 @@ return { |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -15,3 +16,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
getInitialState: function() { | ||
@@ -18,0 +19,0 @@ return { |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var ReactDOM = require('react-dom'); | ||
@@ -14,3 +15,3 @@ | ||
// Render Froala Editor component. | ||
var EditorComponent = React.createClass({ | ||
var EditorComponent = createReactClass({ | ||
getInitialState: function() { | ||
@@ -17,0 +18,0 @@ return {content: '<span>My Document\'s Title</span>'}; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorA=e(require("react")):t.FroalaEditorA=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(4)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorA",mixins:[o],render:function(){return n.createElement("a",{ref:"el"},this.props.children)}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorA=e(require("react")):t.FroalaEditorA=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(4)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("a",{ref:"el"},this.props.children)}});t.exports=s}])}); |
@@ -67,8 +67,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorA = React.createClass({ | ||
displayName: 'FroalaEditorA', | ||
var FroalaEditorA = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -75,0 +74,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorButton=e(require("react")):t.FroalaEditorButton=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(5)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorButton",mixins:[o],render:function(){return n.createElement("button",{ref:"el"},this.props.children)}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorButton=e(require("react")):t.FroalaEditorButton=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(5)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("button",{ref:"el"},this.props.children)}});t.exports=s}])}); |
@@ -333,8 +333,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorButton = React.createClass({ | ||
displayName: 'FroalaEditorButton', | ||
var FroalaEditorButton = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -341,0 +340,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorImg=e(require("react")):t.FroalaEditorImg=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(6)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorImg",mixins:[o],render:function(){return n.createElement("img",{ref:"el"})}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorImg=e(require("react")):t.FroalaEditorImg=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(6)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("img",{ref:"el"})}});t.exports=s}])}); |
@@ -334,8 +334,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorImg = React.createClass({ | ||
displayName: 'FroalaEditorImg', | ||
var FroalaEditorImg = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -342,0 +341,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorInput=e(require("react")):t.FroalaEditorInput=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(7)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,,function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditorInput",mixins:[o],render:function(){return n.createElement("input",{ref:"el"})}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.FroalaEditorInput=e(require("react")):t.FroalaEditorInput=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(7)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},,,,,function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement("input",{ref:"el"})}});t.exports=s}])}); |
@@ -335,8 +335,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditorInput = React.createClass({ | ||
displayName: 'FroalaEditorInput', | ||
var FroalaEditorInput = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -343,0 +342,0 @@ render: function render() { |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.FroalaEditorView=t(require("react")):e.FroalaEditorView=t(e.React)}(this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var i=r[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){e.exports=r(8)},1:function(t,r){t.exports=e},8:function(e,t,r){"use strict";var o=r(1),i=o.createClass({displayName:"FroalaEditorView",defaultTag:"div",getTrustedHtml:function(){return{__html:this.props.model}},render:function(){return this.tag=this.props.tag||this.defaultTag,o.createElement(this.tag,{className:"fr-view",dangerouslySetInnerHTML:this.getTrustedHtml()})}});e.exports=i}})}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.FroalaEditorView=t(require("react")):e.FroalaEditorView=t(e.React)}(this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){e.exports=r(8)},1:function(t,r){t.exports=e},8:function(e,t,r){"use strict";var o=r(1),n=r(!function(){var e=new Error('Cannot find module "create-react-class"');throw e.code="MODULE_NOT_FOUND",e}()),i=n({defaultTag:"div",getTrustedHtml:function(){return{__html:this.props.model}},render:function(){return this.tag=this.props.tag||this.defaultTag,o.createElement(this.tag,{className:"fr-view",dangerouslySetInnerHTML:this.getTrustedHtml()})}});e.exports=i}})}); |
@@ -78,7 +78,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorView = React.createClass({ | ||
displayName: 'FroalaEditorView', | ||
var FroalaEditorView = createReactClass({ | ||
defaultTag: 'div', | ||
@@ -85,0 +84,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.index=e(require("react")):t.index=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(3)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},function(t,e,i){"use strict";var n=i(1),o=i(2),r=n.createClass({displayName:"FroalaEditor",mixins:[o],render:function(){return n.createElement(this.tag,{ref:"el"},this.props.children)}});t.exports=r}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.index=e(require("react")):t.index=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(3)},function(e,i){e.exports=t},function(t,e){"use strict";var i={tag:null,defaultTag:"div",listeningEvents:[],$element:null,$editor:null,config:{immediateReactModelUpdate:!1,reactIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,oldModel:null,componentWillMount:function(){this.tag=this.props.tag||this.defaultTag},componentDidMount:function(){var t=this.refs.el.tagName.toLowerCase();this.SPECIAL_TAGS.indexOf(t)!=-1&&(this.tag=t,this.hasSpecialTag=!0),this.props.onManualControllerReady?this.generateManualController():this.createEditor()},componentWillUnmount:function(){this.destroyEditor()},componentDidUpdate:function(){JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.config=this.props.config||this.config,this.$element=$(this.refs.el),this.setContent(!0),this.registerEvents(),this.$editor=this.$element.froalaEditor(this.config).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){function e(){i.$element.froalaEditor("html.set",i.props.model||"",!0),i.$element.froalaEditor("undo.reset"),i.$element.froalaEditor("undo.saveStep")}var i=this;t?this.registerEvent(this.$element,"froalaEditor.initialized",function(){e()}):e()},setSpecialTagContent:function(){var t=this.props.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this.$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this.$element&&(this.listeningEvents&&this.$element.off(this.listeningEvents.join(" ")),this.$editor.off("keyup"),this.$element.froalaEditor("destroy"),this.listeningEvents.length=0,this.$element=null,this.editorInitialized=!1)},getEditor:function(){return this.$element?this.$element.froalaEditor.bind(this.$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.props.onManualControllerReady(t)},updateModel:function(){if(this.props.onModelChange){var t="";if(this.hasSpecialTag){for(var e=this.$element[0].attributes,i={},n=0;n<e.length;n++){var o=e[n].name;this.config.reactIgnoreAttrs&&this.config.reactIgnoreAttrs.indexOf(o)!=-1||(i[o]=e[n].value)}this.$element[0].innerHTML&&(i[this.INNER_HTML_ATTR]=this.$element[0].innerHTML),t=i}else{var r=this.$element.froalaEditor("html.get");"string"==typeof r&&(t=r)}this.oldModel=t,this.props.onModelChange(t)}},initListeners:function(){var t=this;this.registerEvent(this.$element,"froalaEditor.contentChanged",function(){t.updateModel()}),this.config.immediateReactModelUpdate&&this.registerEvent(this.$editor,"keyup",function(){t.updateModel()})},registerEvent:function(t,e,i){t&&e&&i&&(this.listeningEvents.push(e),t.on(e,i))},registerEvents:function(){var t=this.config.events;if(t)for(var e in t)t.hasOwnProperty(e)&&this.registerEvent(this.$element,e,t[e])}};t.exports=i},function(t,e,i){"use strict";var n=i(1),o=i(!function(){var t=new Error('Cannot find module "create-react-class"');throw t.code="MODULE_NOT_FOUND",t}()),r=i(2),s=o({mixins:[r],render:function(){return n.createElement(this.tag,{ref:"el"},this.props.children)}});t.exports=s}])}); |
@@ -337,7 +337,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var React = __webpack_require__(2); | ||
var createReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"create-react-class\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var FroalaEditorFunctionality = __webpack_require__(3); | ||
var FroalaEditor = React.createClass({ | ||
displayName: 'FroalaEditor', | ||
var FroalaEditor = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -344,0 +343,0 @@ render: function render() { |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var FroalaEditorFunctionality = require('./FroalaEditorFunctionality.jsx'); | ||
var FroalaEditor = React.createClass({ | ||
var FroalaEditor = createReactClass({ | ||
mixins: [FroalaEditorFunctionality], | ||
@@ -6,0 +7,0 @@ render: function() { |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var FroalaEditorFunctionality = require('./FroalaEditorFunctionality.jsx'); | ||
var FroalaEditorA = React.createClass({ | ||
var FroalaEditorA = createReactClass({ | ||
@@ -6,0 +7,0 @@ mixins: [FroalaEditorFunctionality], |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var FroalaEditorFunctionality = require('./FroalaEditorFunctionality.jsx'); | ||
var FroalaEditorButton = React.createClass({ | ||
var FroalaEditorButton = createReactClass({ | ||
@@ -6,0 +7,0 @@ mixins: [FroalaEditorFunctionality], |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var FroalaEditorFunctionality = require('./FroalaEditorFunctionality.jsx'); | ||
var FroalaEditorImg = React.createClass({ | ||
var FroalaEditorImg = createReactClass({ | ||
@@ -6,0 +7,0 @@ mixins: [FroalaEditorFunctionality], |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var FroalaEditorFunctionality = require('./FroalaEditorFunctionality.jsx'); | ||
var FroalaEditorInput = React.createClass({ | ||
var FroalaEditorInput = createReactClass({ | ||
@@ -6,0 +7,0 @@ mixins: [FroalaEditorFunctionality], |
var React = require('react'); | ||
var createReactClass = require('create-react-class'); | ||
var FroalaEditorView = React.createClass({ | ||
var FroalaEditorView = createReactClass({ | ||
@@ -5,0 +6,0 @@ defaultTag: 'div', |
{ | ||
"name": "react-froala-wysiwyg", | ||
"version": "2.5.1", | ||
"version": "2.6.0", | ||
"description": "React component for Froala WYSIWYG HTML rich text editor", | ||
@@ -26,3 +26,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"froala-editor": ">=2.5.1" | ||
"create-react-class": "^15.5.2", | ||
"froala-editor": "^2.6.0" | ||
}, | ||
@@ -29,0 +30,0 @@ "devDependencies": { |
186030
3521
4
+ Addedcreate-react-class@^15.5.2
+ Addedfont-awesome@4.7.0(transitive)
+ Addedfroala-editor@2.9.8(transitive)
+ Addedjquery@3.7.1(transitive)
- Removedfroala-editor@4.5.0(transitive)
Updatedfroala-editor@^2.6.0