Skip to content
Permalink
Browse files

Merge branch 't/12311'

  • Loading branch information...
Reinmar committed Aug 25, 2014
2 parents 558f516 + 5148dff commit b373ace7da77f4d9aa7a2a9e94748525468bafa9
Showing with 11 additions and 2 deletions.
  1. +1 −0 CHANGES.md
  2. +1 −1 plugins/removeformat/plugin.js
  3. +9 −1 tests/plugins/removeformat/plugin.js
@@ -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

@@ -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
@@ -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.

0 comments on commit b373ace

Please sign in to comment.
You can’t perform that action at this time.