|
|
@@ -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 ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'Foo bar baz.' +
|
|
|
'</figcaption>' +
|
|
|
@@ -126,9 +126,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view, { withoutSelection: true } ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -159,7 +159,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 ck-widget image" contenteditable="false"><img src="img.png"></img><span></span>Foo bar baz.</figure>'
|
|
|
+ '<figure class="ck-widget image" contenteditable="false"><img src="img.png"></img><span></span>Foo bar baz.</figure>'
|
|
|
);
|
|
|
} );
|
|
|
|
|
|
@@ -175,9 +175,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'foo bar' +
|
|
|
'</figcaption>' +
|
|
|
@@ -197,9 +197,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -218,9 +218,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src="img.png"></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">baz</figcaption>' +
|
|
|
'</figure>'
|
|
|
);
|
|
|
@@ -239,9 +239,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
);
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>]' +
|
|
|
@@ -262,9 +262,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
);
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'foo bar' +
|
|
|
'</figcaption>' +
|
|
|
@@ -291,9 +291,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
);
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img alt="" src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]' +
|
|
|
'<p></p>'
|
|
|
@@ -321,9 +321,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>]'
|
|
|
@@ -335,9 +335,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -349,9 +349,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
@@ -366,9 +366,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -383,9 +383,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'[]' +
|
|
|
'</figcaption>' +
|
|
|
@@ -403,9 +403,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
@@ -420,14 +420,14 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
|
|
|
'</figure>' +
|
|
|
- '[<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '[<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
|
|
|
'</figure>]'
|
|
|
);
|
|
|
@@ -450,9 +450,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
// Check if there is no figcaption in the view.
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>{}foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'</figcaption>' +
|
|
|
'</figure>'
|
|
|
@@ -463,9 +463,9 @@ describe( 'ImageCaptionEditing', () => {
|
|
|
// Check if figcaption is back with contents.
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
'<p>foo</p>' +
|
|
|
- '<figure class="ck ck-widget image" contenteditable="false">' +
|
|
|
+ '<figure class="ck-widget image" contenteditable="false">' +
|
|
|
'<img src=""></img>' +
|
|
|
- '<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
+ '<figcaption class="ck-editor__editable ck-editor__nested-editable" ' +
|
|
|
'contenteditable="true" data-placeholder="Enter image caption">' +
|
|
|
'{foo bar baz}' +
|
|
|
'</figcaption>' +
|