1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 02:49:56 +02:00

remove is-image-url dev dep since it isnt backwards compatible

This commit is contained in:
Ian Storm Taylor
2016-07-19 11:22:09 -07:00
parent 1117c1942f
commit ed6000b210
2 changed files with 4 additions and 2 deletions

View File

@@ -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)
}