Index: _source/plugins/toolbar/plugin.js
===================================================================
--- _source/plugins/toolbar/plugin.js (revision 6783)
+++ _source/plugins/toolbar/plugin.js (working copy)
@@ -174,6 +174,7 @@
var output = [ '
' : ' style="display:none">' );
@@ -230,6 +231,28 @@
if ( item )
{
+ // Some skins do not accept mixing toolbar items that accept
+ // groups with those that do not accept it. In this case we
+ // need to split the toolbar row. (#7746)
+ if ( avoidGroupMix &&
+ ( ( item.canGroup && !groupStarted && toolbarObj ) ||
+ ( !item.canGroup && groupStarted ) ) )
+ {
+ // Create a new row including all elements after the current item, inclusive.
+ var newRow = row.items ? CKEDITOR.tools.clone( row ) : items.slice( i );
+ newRow.items && ( newRow.items = items.slice( i ) );
+
+ // Add the new toolbar after the current one.
+ toolbar.splice( r + 1, 0, newRow );
+
+ // Reduce the current toolbar to contain the processed items only.
+ items.splice( i );
+
+ // Stop this toolbar processing, so it'll restart for
+ // the newly created toolbar.
+ break;
+ }
+
// Initialize the toolbar first, if needed.
if ( !toolbarObj )
{
Index: _source/skins/kama/skin.js
===================================================================
--- _source/skins/kama/skin.js (revision 6783)
+++ _source/skins/kama/skin.js (working copy)
@@ -12,6 +12,7 @@
dialog : { css : [ 'dialog.css' ] },
templates : { css : [ 'templates.css' ] },
margins : [ 0, 0, 0, 0 ],
+ avoidGroupMix : 1,
init : function( editor )
{
if ( editor.config.width && !isNaN( editor.config.width ) )