Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 't/12311'
  • Loading branch information
Reinmar committed Aug 25, 2014
2 parents 558f516 + 5148dff commit b373ace
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -7,6 +7,7 @@ Fixed Issues:

* [#12315](http://dev.ckeditor.com/ticket/12315): Fixed: Marked [`config.autoParagraph`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-autoParagraph) as deprecated.
* [#12113](http://dev.ckeditor.com/ticket/12113): Fixed: Code snippet should be presented in elements path as "codesnippet".
* [#12311](http://dev.ckeditor.com/ticket/12311): Fixed: Remove format should also remove `<cite>` elements.

## CKEditor 4.4.4

Expand Down
2 changes: 1 addition & 1 deletion plugins/removeformat/plugin.js
Expand Up @@ -169,7 +169,7 @@ CKEDITOR.editor.prototype.addRemoveFormatFilter = function( func ) {
* @cfg
* @member CKEDITOR.config
*/
CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var';
CKEDITOR.config.removeFormatTags = 'b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var';

/**
* A comma separated list of elements attributes to be removed when executing
Expand Down
10 changes: 9 additions & 1 deletion tests/plugins/removeformat/plugin.js
Expand Up @@ -129,12 +129,20 @@ bender.test(
bender.assert.isInnerHtmlMatching( expected, data );
},

// #12311
'test remove format for cite element': function() {
this.editorBot.setHtmlWithSelection( '<p>[foo <cite>bar</cite> baz]</p>' );
this.editor.execCommand( 'removeFormat' );

assert.areEqual( '<p>foo bar baz</p>', this.editor.getData(), 'Cite element should be removed.' );
},

'test editor#addRemoveFormatFilter': function() {
bender.editorBot.create( {
name: 'test_editor2',
config: { allowedContent: true }
}, function( bot ) {
bot.setHtmlWithSelection( '[<p><span style="color:red">foo</span> <b>bar</b></p>]' );
bot.setHtmlWithSelection( '<p>[<span style="color:red">foo</span> <b>bar</b>]</p>' );

bot.editor.addRemoveFormatFilter( function( element ) {
return !element.is( 'b' ); // Don't remove 'b' elements.
Expand Down

0 comments on commit b373ace

Please sign in to comment.