Skip to content

Commit

Permalink
Fix paste: use PastePreProcess event
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Sep 25, 2017
1 parent 8503bc8 commit 9a92ef9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks/editable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class Editable extends Component {
this.changeFormats = this.changeFormats.bind( this );
this.onSelectionChange = this.onSelectionChange.bind( this );
this.maybePropagateUndo = this.maybePropagateUndo.bind( this );
this.onBeforePastePreProcess = this.onBeforePastePreProcess.bind( this );
this.onPastePreProcess = this.onPastePreProcess.bind( this );

this.state = {
formats: {},
Expand Down Expand Up @@ -118,7 +118,7 @@ export default class Editable extends Component {
editor.on( 'keyup', this.onKeyUp );
editor.on( 'selectionChange', this.onSelectionChange );
editor.on( 'BeforeExecCommand', this.maybePropagateUndo );
editor.on( 'BeforePastePreProcess', this.onBeforePastePreProcess );
editor.on( 'PastePreProcess', this.onPastePreProcess, true /* Add before core handlers */ );

patterns.apply( this, [ editor ] );

Expand Down Expand Up @@ -196,7 +196,7 @@ export default class Editable extends Component {
}
}

onBeforePastePreProcess( event ) {
onPastePreProcess( event ) {
// Allows us to ask for this information when we get a report.
window.console.log( 'Received HTML:\n\n', event.content );

Expand Down

0 comments on commit 9a92ef9

Please sign in to comment.