Skip to content

Commit

Permalink
Merge branch 't/11532' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Feb 11, 2014
2 parents 46bb2d0 + 336994b commit dcd4e97
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -5,6 +5,7 @@ CKEditor 4 Changelog

New Features:

* [#11532](http://dev.ckeditor.com/ticket/11532): Added `editor.addContentsCss()` method.
* [#11536](http://dev.ckeditor.com/ticket/11536): Added CKEDITOR.tools.htmlDecode method.
* [#11377](http://dev.ckeditor.com/ticket/11377): Unify internal representation of empty anchors using fake objects.
* [#11225](http://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](http://localhost/cksource/ckeditor-docs/build/#!/api/CKEDITOR.tools-property-transparentImageData) property which contains transparent image data to be used in CSS or as images' source.
Expand Down
22 changes: 22 additions & 0 deletions plugins/wysiwygarea/plugin.js
Expand Up @@ -103,6 +103,28 @@
}
} );

/**
* Adds given stylesheet file path to the exisiting {@link CKEDITOR.config#contentsCss} value.
*
* **Note:** This method is available only with the `wysiwygarea` plugin and affects
* only editors based on it (e.g. not inline editors).
*
* editor.addContentsCss( 'assets/contents.css' );
*
* @param {String} cssPath Path to the stylesheet file which should be added.
* @member CKEDITOR.editor
*/
CKEDITOR.editor.prototype.addContentsCss = function( cssPath ) {
var cfg = this.config,
curContentsCss = cfg.contentsCss;

// Convert current value into array.
if ( !CKEDITOR.tools.isArray( curContentsCss ) )
cfg.contentsCss = curContentsCss ? [ curContentsCss ] : [];

cfg.contentsCss.push( cssPath );
};

function onDomReady( win ) {
var editor = this.editor,
doc = win.document,
Expand Down

0 comments on commit dcd4e97

Please sign in to comment.