Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/block/text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ import {
ConditionalDisplay,
Transform,
} from '~stackable/block-components'
import { version as VERSION, i18n } from 'stackable'
import {
version as VERSION,
i18n,
settings,
} from 'stackable'
import classnames from 'classnames'
import {
InspectorTabs,
Expand Down Expand Up @@ -144,7 +148,8 @@ const Edit = props => {
onMerge={ mergeBlocks }
onRemove={ onRemove }
onReplace={ onReplace }
onPaste={ onPaste }
// Only use the custom onPaste (for pasting block) when text is the default block and the current text is empty
onPaste={ settings.stackable_enable_text_default_block && props.attributes.text === '' ? onPaste : undefined }
/>
</BlockDiv>
{ props.isHovered && <MarginBottom /> }
Expand Down
Loading