mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-19 05:31:56 +02:00
remove selection state handling from image block in examples
This commit is contained in:
@@ -16,12 +16,10 @@ import { Map } from 'immutable'
|
||||
const NODES = {
|
||||
image: (props) => {
|
||||
const { node, state } = props
|
||||
const { data } = node
|
||||
const isActive = state.isFocused && state.blocks.includes(node)
|
||||
const src = data.get('src')
|
||||
const src = node.data.get('src')
|
||||
return (
|
||||
<Void {...props} className="image-block">
|
||||
<img {...props.attributes} src={src} data-active={isActive} />
|
||||
<img {...props.attributes} src={src} />
|
||||
</Void>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user