X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Fdom%2Fdocument.js;h=e1026c13aa776e5d0d0771dcb8afd4439fb4d21b;hp=dd0f9a0f9b57aa3ad96aeb9b087a17af36e5b0d2;hb=941b0a9ba4e673e292510d80a5a86806994b8ea6;hpb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d diff --git a/_source/core/dom/document.js b/_source/core/dom/document.js index dd0f9a0..e1026c1 100644 --- a/_source/core/dom/document.js +++ b/_source/core/dom/document.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -52,6 +52,21 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, } }, + appendStyleText : function( cssStyleText ) + { + if ( this.$.createStyleSheet ) + { + var styleSheet = this.$.createStyleSheet( "" ); + styleSheet.cssText = cssStyleText ; + } + else + { + var style = new CKEDITOR.dom.element( 'style', this ); + style.append( new CKEDITOR.dom.text( cssStyleText, this ) ); + this.getHead().append( style ); + } + }, + createElement : function( name, attribsAndStyles ) { var element = new CKEDITOR.dom.element( name, this );