Comparing version
@@ -42,2 +42,3 @@ 'use strict'; | ||
_this.handleKeyPress = _this.handleKeyPress.bind(_this); | ||
_this.imageLoaded = _this.imageLoaded.bind(_this); | ||
return _this; | ||
@@ -98,4 +99,10 @@ } | ||
value: function imageLoaded(e) { | ||
console.log(e.target.naturalWidth); | ||
if (e.target.src.indexOf('blob:') === 0) { | ||
URL.revokeObjectURL(e.target.src); | ||
} else { | ||
var newContent = this.props.content; | ||
newContent.width = e.target.naturalWidth; | ||
newContent.height = e.target.naturalHeight; | ||
this.props.onContentChanged(this.props.position, newContent); | ||
} | ||
@@ -146,15 +153,2 @@ } | ||
); | ||
// if(!content || content.url === "") { | ||
// return ( | ||
// <div className="katap-block katap-image"> | ||
// </div> | ||
// ); | ||
// } else { | ||
// return ( | ||
// <div className="katap-block katap-image"> | ||
// </div> | ||
// ); | ||
// } | ||
} | ||
@@ -161,0 +155,0 @@ }]); |
{ | ||
"name": "kattappa", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"description": "A block based rich text editor with support of Images, embeds( Youtube, Instagram, Vine, Vimeo etc)", | ||
@@ -10,3 +10,3 @@ "main": "./lib/index.js", | ||
"npm": "./node_modules/.bin/babel ./src -d lib --ignore 'demo.js'", | ||
"dev": "./node_modules/.bin/webpack-dev-server --host 0.0.0.0 --port 8080 --devtool eval --content-base lib/ --progress --colors --hot" | ||
"dev": "mkdir -p lib && cp index.template.html lib/index.html && ./node_modules/.bin/webpack-dev-server --host 0.0.0.0 --port 8080 --devtool eval --content-base lib/ --progress --colors --hot" | ||
}, | ||
@@ -13,0 +13,0 @@ "repository": { |
@@ -0,1 +1,3 @@ | ||
Current development going on in [scribe](https://github.com/brijeshb42/kattappa/tree/scribe) branch. | ||
>Note: This project is highly under development as it is being integrated into our CMS and the APIs are not consistent and can change at anytime. New features are added (or something is removed) based on the requirements of the CMS. | ||
@@ -2,0 +4,0 @@ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
100771
0.19%50
4.17%2225
-0.18%