Browse Source

Docs: Added the missing "dir" attribute to the multi–root editor toolbar to make sure it renders properly (in the example and in the guide).

Aleksander Nowodzinski 6 years ago
parent
commit
5c4dba2cfc

+ 5 - 2
docs/_snippets/examples/multi-root-editor.js

@@ -366,13 +366,16 @@ class MultirootEditorUIView extends EditorUIView {
 		}
 
 		// This toolbar may be placed anywhere in the page so things like font size need to be reset in it.
-		// Also because of the above, make sure the toolbar supports rounded corners.
+		// Because of the above, make sure the toolbar supports rounded corners.
+		// Also, make sure the toolbar has the proper dir attribute because its ancestor may not have one
+		// and some toolbar item styles depend on this attribute.
 		Template.extend( this.toolbar.template, {
 			attributes: {
 				class: [
 					'ck-reset_all',
 					'ck-rounded-corners'
-				]
+				],
+				dir: locale.uiLanguageDirection
 			}
 		} );
 	}

+ 5 - 2
docs/framework/guides/custom-editor-creator.md

@@ -369,13 +369,16 @@ class MultirootEditorUIView extends EditorUIView {
 		}
 
 		// This toolbar may be placed anywhere in the page so things like font size need to be reset in it.
-		// Also because of the above, make sure the toolbar supports rounded corners.
+		// Because of the above, make sure the toolbar supports rounded corners.
+		// Also, make sure the toolbar has the proper dir attribute because its ancestor may not have one
+		// and some toolbar item styles depend on this attribute.
 		Template.extend( this.toolbar.template, {
 			attributes: {
 				class: [
 					'ck-reset_all',
 					'ck-rounded-corners'
-				]
+				],
+				dir: locale.uiLanguageDirection
 			}
 		} );
 	}