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

Added the DOM `dir` attribute do the `.ck-body` collection to let its children recognize RTL languages and adapt.

Aleksander Nowodzinski 6 лет назад
Родитель
Сommit
18abdcc549
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      packages/ckeditor5-ui/src/editorui/editoruiview.js

+ 3 - 1
packages/ckeditor5-ui/src/editorui/editoruiview.js

@@ -69,6 +69,7 @@ export default class EditorUIView extends View {
 	 * @private
 	 */
 	_renderBodyCollection() {
+		const locale = this.locale;
 		const bodyElement = this._bodyCollectionContainer = new Template( {
 			tag: 'div',
 			attributes: {
@@ -77,7 +78,8 @@ export default class EditorUIView extends View {
 					'ck-reset_all',
 					'ck-body',
 					'ck-rounded-corners'
-				]
+				],
+				dir: locale.languageDirection,
 			},
 			children: this.body
 		} ).render();