|
|
@@ -101,7 +101,9 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
|
|
|
'<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true">Foo bar baz.</figcaption>' +
|
|
|
+ '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ 'Foo bar baz.' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -112,7 +114,8 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
|
|
|
'<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck-editable ck-editable_hidden" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-placeholder ck-editable ck-editable_hidden" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -163,7 +166,8 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[]<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-editable_hidden" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-placeholder ck-editable ck-editable_hidden" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -184,7 +188,9 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[]<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true">foo bar</figcaption>' +
|
|
|
+ '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ 'foo bar' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -211,7 +217,8 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-placeholder ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
} );
|
|
|
@@ -222,7 +229,8 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[]<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-editable_hidden" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-placeholder ck-editable ck-editable_hidden" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -233,7 +241,7 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true">foo bar</figcaption>' +
|
|
|
+ '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
} );
|
|
|
@@ -248,7 +256,8 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[]<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-editable_hidden" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-placeholder ck-editable ck-editable_hidden" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -263,7 +272,9 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true">[]</figcaption>' +
|
|
|
+ '<figcaption class="ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '[]' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -280,7 +291,7 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
} );
|
|
|
@@ -296,11 +307,11 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true">foo bar</figcaption>' +
|
|
|
+ '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
|
|
|
'</figure>' +
|
|
|
'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-placeholder ck-editable" contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
} );
|
|
|
@@ -325,7 +336,8 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'[]<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-editable_hidden" contenteditable="true"></figcaption>' +
|
|
|
+ '<figcaption class="ck-editable ck-editable_hidden ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
|
|
|
@@ -335,7 +347,9 @@ describe( 'ImageCaptionEngine', () => {
|
|
|
expect( getViewData( viewDocument ) ).to.equal(
|
|
|
'<figure class="image ck-widget" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true">{foo bar baz}</figcaption>' +
|
|
|
+ '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '{foo bar baz}' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|