Skip to content

Commit

Permalink
Make paste work
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Apr 11, 2018
1 parent 188e4a8 commit 86770b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion blocks/library/quote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Toolbar, withState } from '@wordpress/components';
*/
import './style.scss';
import './editor.scss';
import { createBlock } from '../../api';
import { createBlock, rawHandler } from '../../api';
import AlignmentToolbar from '../../alignment-toolbar';
import BlockControls from '../../block-controls';
import RichText from '../../rich-text';
Expand Down Expand Up @@ -65,6 +65,12 @@ export const settings = {
{
type: 'raw',
isMatch: ( node ) => node.nodeName === 'BLOCKQUOTE',
transform( node ) {
return createBlock( name, {}, rawHandler( {
HTML: node.innerHTML,
mode: 'BLOCKS',
} ) );
},
},
],
to: [
Expand Down

0 comments on commit 86770b7

Please sign in to comment.