Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.0.1
[ckeditor.git]
/
_source
/
core
/
tools.js
diff --git
a/_source/core/tools.js
b/_source/core/tools.js
index
29b34b4
..
6f95428
100644
(file)
--- a/
_source/core/tools.js
+++ b/
_source/core/tools.js
@@
-197,18
+197,27
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
* alert( CKEDITOR.tools.cssStyleToDomStyle( 'background-color' ) ); // "backgroundColor"
\r
* alert( CKEDITOR.tools.cssStyleToDomStyle( 'float' ) ); // "cssFloat"
\r
*/
\r
* alert( CKEDITOR.tools.cssStyleToDomStyle( 'background-color' ) ); // "backgroundColor"
\r
* alert( CKEDITOR.tools.cssStyleToDomStyle( 'float' ) ); // "cssFloat"
\r
*/
\r
- cssStyleToDomStyle : function( cssName )
\r
+ cssStyleToDomStyle : ( function()
\r
{
\r
{
\r
- if ( cssName == 'float' )
\r
- return 'cssFloat';
\r
- else
\r
+ var test = document.createElement( 'div' ).style;
\r
+
\r
+ var cssFloat = ( typeof test.cssFloat != 'undefined' ) ? 'cssFloat'
\r
+ : ( typeof test.styleFloat != 'undefined' ) ? 'styleFloat'
\r
+ : 'float';
\r
+
\r
+ return function( cssName )
\r
{
\r
{
\r
- return cssName.replace( /-./g, function( match )
\r
- {
\r
- return match.substr( 1 ).toUpperCase();
\r
- });
\r
- }
\r
- },
\r
+ if ( cssName == 'float' )
\r
+ return cssFloat;
\r
+ else
\r
+ {
\r
+ return cssName.replace( /-./g, function( match )
\r
+ {
\r
+ return match.substr( 1 ).toUpperCase();
\r
+ });
\r
+ }
\r
+ };
\r
+ } )(),
\r
\r
/**
\r
* Replace special HTML characters in a string with their relative HTML
\r
\r
/**
\r
* Replace special HTML characters in a string with their relative HTML
\r