Skip to content

Commit

Permalink
Merge branch 't/14747'
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Aug 22, 2016
2 parents 3f284ed + 28bf7d6 commit 2f98a20
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ CKEditor 4 Changelog

## CKEditor 4.5.11

New Features:

* [#14747](http://dev.ckeditor.com/ticket/14747): The enhanced image caption does not support the link target attribute.

Fixed Issues:

* [#13755](http://dev.ckeditor.com/ticket/13755): [Edge] Fixed: Pasting images in Edge does not work.
Expand Down
2 changes: 1 addition & 1 deletion plugins/image2/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
editables: {
caption: {
selector: 'figcaption',
allowedContent: 'br em strong sub sup u s; a[!href]'
allowedContent: 'br em strong sub sup u s; a[!href,target]'
}
},

Expand Down
26 changes: 24 additions & 2 deletions tests/plugins/image2/acf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* bender-tags: editor,unit,widget */
/* bender-ckeditor-plugins: image2,justify,toolbar */
/* bender-ckeditor-plugins: image2,justify,toolbar,link */
/* global widgetTestsTools, image2TestsTools */

( function() {
Expand Down Expand Up @@ -63,6 +63,17 @@
height: true,
hasCaption: true
}
},
link_target_allowed: {
name: 'link_target_allowed',
fields: {
src: true,
alt: true,
align: true,
width: true,
height: true,
hasCaption: true
}
}
};

Expand Down Expand Up @@ -247,6 +258,17 @@
);
},

'test allow caption link target': function() {
var bot = this.editorBots.link_target_allowed,
content = '<figure><img alt="" src="_assets/bar.png" /><figcaption>' +
'<a href="http://google.com" target="_blank">caption</a>' +
'</figcaption></figure>';

bot.setData( content, function() {
bender.assert.isInnerHtmlMatching( content, bot.getData() );
} );
},

'test justify plugin integration when (alignment disallowed)': function() {
var bot = this.editorBots.no_align;

Expand All @@ -265,4 +287,4 @@
} );
}
} );
} )();
} )();

0 comments on commit 2f98a20

Please sign in to comment.