33 */
44import { createElement , Component } from 'wp-elements' ;
55
6- import { EditableComponent , EnhancedInputComponent } from 'wp-blocks' ;
7- import { serialize } from 'serializers/block' ;
8- import { parse } from 'parsers/block' ;
6+ /**
7+ * Internal dependencies
8+ */
9+ import { EditableComponent } from 'wp-blocks' ;
910import EditableFormatToolbar from 'controls/editable-format-toolbar' ;
1011import BlockArrangement from 'controls/block-arrangement' ;
12+ import TransformBlockToolbar from 'controls/transform-block-toolbar' ;
1113
1214export default class QuoteBlockForm extends Component {
1315 bindContent = ( ref ) => {
@@ -59,7 +61,7 @@ export default class QuoteBlockForm extends Component {
5961 render ( ) {
6062 const { block, change, moveCursorUp, moveCursorDown, remove,
6163 mergeWithPrevious, appendBlock, isSelected, focusConfig, focus,
62- moveBlockUp, moveBlockDown } = this . props ;
64+ moveBlockUp, moveBlockDown, select , unselect , transform } = this . props ;
6365 const splitValue = ( left , right ) => {
6466 change ( { cite : left } ) ;
6567 appendBlock ( {
@@ -78,13 +80,17 @@ export default class QuoteBlockForm extends Component {
7880 moveBlockUp = { moveBlockUp } moveBlockDown = { moveBlockDown } /> }
7981 { isSelected &&
8082 < div className = "block-list__block-controls" >
83+ < div className = "block-list__block-controls-group" >
84+ < TransformBlockToolbar blockType = "quote" onTransform = { transform } />
85+ </ div >
86+
8187 < div className = "block-list__block-controls-group" >
8288 < EditableFormatToolbar editable = { focusInput === 'content' ? this . content : this . cite } ref = { this . bindFormatToolbar } />
8389 </ div >
8490 </ div >
8591 }
8692
87- < div className = "quote-block__form" >
93+ < div className = "quote-block__form" onClick = { select } >
8894 < div className = "quote-block__content" >
8995 < EditableComponent
9096 ref = { this . bindContent }
@@ -97,6 +103,7 @@ export default class QuoteBlockForm extends Component {
97103 setToolbarState = { focusInput === 'content' ? this . setToolbarState : undefined }
98104 focusConfig = { focusInput === 'content' ? focusConfig : null }
99105 onFocusChange = { ( config ) => focus ( Object . assign ( { input : 'content' } , config ) ) }
106+ onType = { unselect }
100107 inline
101108 />
102109 </ div >
@@ -113,6 +120,7 @@ export default class QuoteBlockForm extends Component {
113120 setToolbarState = { focusInput === 'cite' ? this . setToolbarState : undefined }
114121 focusConfig = { focusInput === 'cite' ? focusConfig : null }
115122 onFocusChange = { ( config ) => focus ( Object . assign ( { input : 'cite' } , config ) ) }
123+ onType = { unselect }
116124 inline
117125 single
118126 />
0 commit comments