import React from 'react'; import PropTypes from 'prop-types'; import {omit} from 'lodash'; import {connect} from 'react-redux'; import BaseUnstyledComponent from './BaseUnstyledComponent'; /** * This block is used by default for text content in editor. * * It handles drag events and lets editor blocks to be dropped on it. * There is dropzone indication after the text and on drop it will put * atom block after current block. */ class UnstyledBlock extends BaseUnstyledComponent { getDropBlockKey: any; constructor(props) { super(props); this.dropInsertionMode = 'after'; this.getDropBlockKey = () => this.props.children['key']; } render() { const {className} = this.props; const propsToTransfer = omit(this.props, ['className', 'invisibles', 'dispatch', 'editorProps']); return (