Skip to content

Commit

Permalink
Merge branch 't/12885'
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Jasiun committed Feb 2, 2015
2 parents 6a8dc27 + 871366a commit a167f43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -6,6 +6,7 @@ CKEditor 4 Changelog
Fixed Issues:

* [#12796](http://dev.ckeditor.com/ticket/12796): Fixed: [Indent List](http://ckeditor.com/addon/indentlist) plugin unwraps parent li elements.
* [#12885](http://dev.ckeditor.com/ticket/12885): Added missing getData parameter documentation.

Other Changes:

Expand Down
12 changes: 9 additions & 3 deletions core/editor.js
Expand Up @@ -859,10 +859,16 @@
* if ( CKEDITOR.instances.editor1.getData() == '' )
* alert( 'There is no data available.' );
*
* @param {Boolean} internal If set to `true`, it will prevent firing the
* {@link CKEDITOR.editor#beforeGetData} and {@link CKEDITOR.editor#event-getData} events, so
* the real content of the editor will not be read and cached data will be returned. The method will work
* much faster, but this may result in the editor returning the data that is not up to date. This parameter
* should thus only be set to `true` when you are certain that the cached is up to date.
*
* @returns {String} The editor data.
*/
getData: function( noEvents ) {
!noEvents && this.fire( 'beforeGetData' );
getData: function( internal ) {
!internal && this.fire( 'beforeGetData' );

var eventData = this._.data;

Expand All @@ -877,7 +883,7 @@
eventData = { dataValue: eventData };

// Fire "getData" so data manipulation may happen.
!noEvents && this.fire( 'getData', eventData );
!internal && this.fire( 'getData', eventData );

return eventData.dataValue;
},
Expand Down

0 comments on commit a167f43

Please sign in to comment.