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

Merge pull request #271 from ckeditor/t/ckeditor5/479

Internal: Aligned to changes in the engine API (renamed `attachPlaceholder()` to `addPlaceholder()` (see ckeditor/ckeditor5#479).
Piotr Jasiun 7 лет назад
Родитель
Сommit
22260c6d82
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      packages/ckeditor5-image/src/imagecaption/utils.js

+ 7 - 2
packages/ckeditor5-image/src/imagecaption/utils.js

@@ -7,7 +7,7 @@
  * @module image/imagecaption/utils
  * @module image/imagecaption/utils
  */
  */
 
 
-import { attachPlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder';
+import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder';
 import { toWidgetEditable } from '@ckeditor/ckeditor5-widget/src/utils';
 import { toWidgetEditable } from '@ckeditor/ckeditor5-widget/src/utils';
 
 
 const captionSymbol = Symbol( 'imageCaption' );
 const captionSymbol = Symbol( 'imageCaption' );
@@ -23,7 +23,12 @@ export function captionElementCreator( view, placeholderText ) {
 	return writer => {
 	return writer => {
 		const editable = writer.createEditableElement( 'figcaption' );
 		const editable = writer.createEditableElement( 'figcaption' );
 		writer.setCustomProperty( captionSymbol, true, editable );
 		writer.setCustomProperty( captionSymbol, true, editable );
-		attachPlaceholder( view, editable, placeholderText );
+
+		enablePlaceholder( {
+			view,
+			element: editable,
+			text: placeholderText
+		} );
 
 
 		return toWidgetEditable( editable, writer );
 		return toWidgetEditable( editable, writer );
 	};
 	};