Explorar el Código

Docs: Moved toolbar option higher to make it more visible that it's the image toolbar configuration (without it error is thrown).

Piotrek Koszuliński hace 8 años
padre
commit
97c953131a
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. 4 3
      packages/ckeditor5-image/docs/features/image.md

+ 4 - 3
packages/ckeditor5-image/docs/features/image.md

@@ -121,6 +121,9 @@ import alignRightIcon from '@ckeditor/ckeditor5-core/theme/icons/object-right.sv
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
 		image: {
+			// You need to configure the image toolbar too, so it uses the new style buttons.
+			toolbar: [ 'imageTextAlternative', '|', 'imageStyleLeft', 'imageStyleFull', 'imageStyleRight' ],
+
 			styles: [
 				// This option is equal to a situation where no style is applied.
 				{
@@ -147,9 +150,7 @@ ClassicEditor
 					value: 'right',
 					className: 'image-style-right'
 				}
-			],
-
-			toolbar: [ 'imageTextAlternative', '|', 'imageStyleLeft', 'imageStyleFull', 'imageStyleRight' ]
+			]
 		}
 	} )
 	.then( ... )