|
@@ -149,10 +149,15 @@ function enableAlignmentProperty( schema, conversion ) {
|
|
|
value: viewElement => viewElement.getAttribute( 'align' )
|
|
value: viewElement => viewElement.getAttribute( 'align' )
|
|
|
}
|
|
}
|
|
|
} );
|
|
} );
|
|
|
|
|
+
|
|
|
conversion.for( 'downcast' ).add( dispatcher => dispatcher.on( 'attribute:alignment:table', ( evt, data, conversionApi ) => {
|
|
conversion.for( 'downcast' ).add( dispatcher => dispatcher.on( 'attribute:alignment:table', ( evt, data, conversionApi ) => {
|
|
|
const { item, attributeNewValue } = data;
|
|
const { item, attributeNewValue } = data;
|
|
|
const { mapper, writer } = conversionApi;
|
|
const { mapper, writer } = conversionApi;
|
|
|
|
|
|
|
|
|
|
+ if ( !conversionApi.consumable.consume( data.item, evt.name ) ) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const table = [ ...mapper.toViewElement( item ).getChildren() ].find( child => child.is( 'table' ) );
|
|
const table = [ ...mapper.toViewElement( item ).getChildren() ].find( child => child.is( 'table' ) );
|
|
|
|
|
|
|
|
if ( !attributeNewValue ) {
|
|
if ( !attributeNewValue ) {
|