-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Review fixes: extract helpers method, remove tools modifications from…
… history.
- Loading branch information
Mateusz Samsel
committed
Nov 20, 2017
1 parent
372cb96
commit e682277
Showing
5 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* exported replaceAppendStyleSheet, convertRgbaToRgb */ | ||
|
||
'use strict'; | ||
|
||
function replaceAppendStyleSheet() { | ||
// Overwrite prototype to simulate missing css file. | ||
var oldFn = CKEDITOR.dom.document.prototype.appendStyleSheet; | ||
CKEDITOR.dom.document.prototype.appendStyleSheet = function( cssFileUrl ) { | ||
// Simulate missing css in skin. | ||
if ( !cssFileUrl.match( /(inlinetoolbar|balloonpanel)\.css/ ) ) { | ||
oldFn.call( CKEDITOR.document, cssFileUrl ); | ||
} | ||
}; | ||
} | ||
|
||
function convertRgbaToRgb( input ) { | ||
var re = /^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/gi; | ||
return re.test( input ) ? input.replace( /,\s*?\d+?\s*?\)$/, ')' ).replace( 'rgba(', 'rgb(' ) : input; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
@bender-ui: collapsed | ||
@bender-tags: 4.8.0, bug, inlinetoolbar | ||
@bender-ckeditor-plugins: wysiwygarea,toolbar,basicstyles,floatingspace,inlinetoolbar,link,image,resize,language,stylescombo | ||
@bender-include: ../_helpers/default.js | ||
|
||
Perform below steps in both editors: | ||
1. Click image. | ||
1. Check how inline toolbar looks like. | ||
|
||
_Note:_ Please be aware that buttons in inline toolbar use main skin. | ||
|
||
**Expected:** Inline toolbar background should be different from used skin (fallback css should be load). | ||
**Expected:** Inline toolbar background should be different from used skin (fallback `default.css` should be loaded). | ||
|
||
**Unexpected:** Inline toolbar is not visible. Inline toolbar has the same skin as editor (grey gradient at ballon background). |