Skip to content
Permalink
Browse files

Merge branch 't/14590'

  • Loading branch information...
Tade0 committed May 18, 2016
2 parents 655faaf + a8f4191 commit 619cd60efb3b675508dd12eea9efb2b22fc77a46
Showing with 46 additions and 0 deletions.
  1. +2 −0 CHANGES.md
  2. +1 −0 plugins/htmlwriter/plugin.js
  3. +43 −0 tests/plugins/htmlwriter/htmlwriter.js
@@ -3,6 +3,8 @@ CKEditor 4 Changelog

## CKEditor 4.5.10

* [#14590](http://dev.ckeditor.com/ticket/14590): Fixed: Additional line break appearing after inline elements when switching modes. Thanks to [dpidcock](https://github.com/dpidcock)!

## CKEditor 4.5.9

Fixed Issues:
@@ -289,6 +289,7 @@ CKEDITOR.htmlWriter = CKEDITOR.tools.createClass( {
this._.indentation = '';
this._.afterCloser = 0;
this._.inPre = 0;
this._.needsSpace = 0;
},

/**
@@ -0,0 +1,43 @@
/* bender-tags: editor,unit */
/* bender-ckeditor-plugins: wysiwygarea, htmlwriter */
bender.test( {
'test extra line break': function() {
var data = '<div>Text <strong>inline</strong> Text <p>paragraph</p></div>';

bender.editorBot.create( {
name: 'basic1',
formattedOutput: true,

config: {
allowedContent: true,

on: {
instanceReady: function( evt ) {
evt.editor.dataProcessor.writer.setRules( 'p', {
indent: true,
breakBeforeOpen: true,
breakAfterOpen: true,
breakBeforeClose: true,
breakAfterClose: true
} );

evt.editor.dataProcessor.writer.setRules( 'div', {
indent: true,
breakBeforeOpen: false,
breakAfterOpen: true,
breakBeforeClose: false,
breakAfterClose: true
} );
}
}
}
}, function( bot ) {
bot.setData( data, function() {
var afterFormat = bot.getData( false, false );

// Trigger getData a second time to reveal bug.
assert.areSame( afterFormat, bot.getData( false, false ) );
} );
} );
}
} );

0 comments on commit 619cd60

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