ソースを参照

Add resize handles to Document example.

panr 5 年 前
コミット
d451776731
1 ファイル変更6 行追加1 行削除
  1. 6 1
      docs/_snippets/examples/document-editor.js

+ 6 - 1
docs/_snippets/examples/document-editor.js

@@ -6,11 +6,16 @@
 /* globals console, window, document */
 
 import DecoupledEditor from '@ckeditor/ckeditor5-build-decoupled-document/src/ckeditor';
+import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize';
 import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
 
 DecoupledEditor
 	.create( document.querySelector( '.document-editor__editable' ), {
-		cloudServices: CS_CONFIG
+		extraPlugins: [ ImageResize ],
+		cloudServices: CS_CONFIG,
+		image: {
+			toolbar: [ 'imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight' ]
+		}
 	} )
 	.then( editor => {
 		const toolbarContainer = document.querySelector( '.document-editor__toolbar' );