mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-26 08:34:28 +02:00
remove is-image-url dev dep since it isnt backwards compatible
This commit is contained in:
@@ -3,7 +3,8 @@ import { Editor, Mark, Raw } from '../..'
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import initialState from './state.json'
|
||||
import isImage from 'is-image-url'
|
||||
import isImage from 'is-image'
|
||||
import isUrl from 'is-url'
|
||||
import { Map } from 'immutable'
|
||||
|
||||
/**
|
||||
@@ -137,6 +138,7 @@ class Images extends React.Component {
|
||||
|
||||
onPaste = (e, paste, state) => {
|
||||
if (paste.type != 'text') return
|
||||
if (!isUrl(paste.text)) return
|
||||
if (!isImage(paste.text)) return
|
||||
return this.insertImage(state, paste.text)
|
||||
}
|
||||
|
@@ -14,7 +14,6 @@
|
||||
"detect-browser": "^1.3.3",
|
||||
"esrever": "^0.2.0",
|
||||
"immutable": "^3.8.1",
|
||||
"is-image-url": "^1.1.8",
|
||||
"keycode": "^2.1.2",
|
||||
"lodash": "^4.13.1",
|
||||
"react-portal": "^2.2.0",
|
||||
@@ -42,6 +41,7 @@
|
||||
"exorcist": "^0.4.0",
|
||||
"gh-pages": "^0.11.0",
|
||||
"http-server": "^0.9.0",
|
||||
"is-image": "^1.0.1",
|
||||
"is-url": "^1.2.2",
|
||||
"mocha": "^2.5.3",
|
||||
"prismjs": "^1.5.1",
|
||||
|
Reference in New Issue
Block a user