8
0
Просмотр исходного кода

Align code to the latest changes in view consumable API.

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
a6e0bfcbda
1 измененных файлов с 1 добавлено и 15 удалено
  1. 1 15
      packages/ckeditor5-indent/src/indentblock.js

+ 1 - 15
packages/ckeditor5-indent/src/indentblock.js

@@ -99,24 +99,10 @@ export default class IndentBlock extends Plugin {
 		const locale = this.editor.locale;
 		const marginProperty = locale.contentLanguageDirection === 'rtl' ? 'margin-right' : 'margin-left';
 
-		// TODO: breaks something..
-		// conversion.for( 'upcast' ).attributeToAttribute( {
-		// 	view: {
-		// 		styles: {
-		// 			[ marginProperty ]: /[\s\S]+/
-		// 		}
-		// 	},
-		// 	model: {
-		// 		key: 'blockIndent',
-		// 		value: viewElement => viewElement.getStyle( marginProperty )
-		// 	}
-		// } );
-
-		// The margin shorthand should also work.
 		conversion.for( 'upcast' ).attributeToAttribute( {
 			view: {
 				styles: {
-					'margin': /[\s\S]+/
+					[ marginProperty ]: /[\s\S]+/
 				}
 			},
 			model: {