|
|
@@ -111,9 +111,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
setModelData( model, '<image src="img.png"><caption>Foo bar baz.</caption></image>' );
|
|
|
|
|
|
expect( getViewData( view, { withoutSelection: true } ) ).to.equal(
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'Foo bar baz.' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -125,9 +125,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view, { withoutSelection: true } ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -158,7 +158,7 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
setModelData( model, '<image src="img.png"><caption>Foo bar baz.</caption></image>' );
|
|
|
|
|
|
expect( getViewData( view, { withoutSelection: true } ) ).to.equal(
|
|
|
- '<figure class="ck-widget image" contenteditable="false"><img src="img.png"></img><span></span>Foo bar baz.</figure>'
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false"><img src="img.png"></img><span></span>Foo bar baz.</figure>'
|
|
|
);
|
|
|
} );
|
|
|
|
|
|
@@ -174,9 +174,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'foo bar' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -195,9 +195,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -216,9 +216,11 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">baz</figcaption>' +
|
|
|
+ '<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ 'baz' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
} );
|
|
|
@@ -236,9 +238,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
);
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>]' +
|
|
|
@@ -259,9 +261,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
);
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'foo bar' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>]' +
|
|
|
@@ -287,9 +289,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
);
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]' +
|
|
|
'<p></p>'
|
|
|
@@ -317,9 +319,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '<figcaption class="ck ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
@@ -330,9 +332,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -344,9 +346,11 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
|
|
|
+ '<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ 'foo bar' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
} );
|
|
|
@@ -360,9 +364,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -377,9 +381,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '<figcaption class="ck ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'[]' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -396,9 +400,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
@@ -413,13 +417,15 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
|
|
|
+ '<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ 'foo bar' +
|
|
|
+ '</figcaption>' +
|
|
|
'</figure>' +
|
|
|
- '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
@@ -442,9 +448,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
// Check if there is no figcaption in the view.
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -455,9 +461,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
// Check if figcaption is back with contents.
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
+ '<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'{foo bar baz}' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|