` or ``.
*/
- $tableContent: { caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1 },
+ $tableContent: { caption: 1, col: 1, colgroup: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1 },
/**
* List of "transparent" elements. See [W3C's definition of "transparent" element](http://dev.w3.org/html5/markup/terminology.html#transparent).
*/
- $transparent: { a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1 },
+ $transparent: { a: 1, audio: 1, canvas: 1, del: 1, ins: 1, map: 1, noscript: 1, object: 1, video: 1 },
/**
* List of elements that are not to exist standalone that must live under it's parent element.
*/
- $intermediate: { caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1 }
+ $intermediate: { caption: 1, colgroup: 1, dd: 1, dt: 1, figcaption: 1, legend: 1, li: 1, optgroup: 1,
+ option: 1, rp: 1, rt: 1, summary: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1 }
} );
return dtd;
-})();
+} )();
// PACKAGER_RENAME( CKEDITOR.dtd )
diff --git a/core/editable.js b/core/editable.js
index 42c67273716..ea2a9892bc4 100644
--- a/core/editable.js
+++ b/core/editable.js
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
-(function() {
+( function() {
/**
* Editable class which provides all editing related activities by
* the `contenteditable` element, dynamically get attached to editor instance.
@@ -11,7 +11,7 @@
* @class CKEDITOR.editable
* @extends CKEDITOR.dom.element
*/
- CKEDITOR.editable = CKEDITOR.tools.createClass({
+ CKEDITOR.editable = CKEDITOR.tools.createClass( {
base: CKEDITOR.dom.element,
/**
* The constructor hold only generic editable creation logic that are commonly shared among all different editable elements.
@@ -68,9 +68,9 @@
// Remedy if Safari doens't applies focus properly. (#279)
if ( CKEDITOR.env.safari && !this.isInline() ) {
active = CKEDITOR.document.getActive();
- if ( !active.equals( this.getWindow().getFrame() ) ) {
+ if ( !active.equals( this.getWindow().getFrame() ) )
this.getWindow().focus();
- }
+
}
},
@@ -220,7 +220,7 @@
if ( !isEnterBrMode ) {
html = html.replace( new RegExp( ' (?=' + paragraphTag + '>)' ), function( match ) {
return tools.repeat( match, 2 );
- });
+ } );
}
// Preserve spaces at the ends, so they won't be lost after insertion (merged with adjacent ones).
@@ -267,7 +267,7 @@
// * fill emptied | s with if browser needs them,
// * remove empty text nodes so IE8 won't crash (http://dev.ckeditor.com/ticket/11183#comment:8),
// * fix structure and move range into the | element.
- if ( range.startContainer.type == CKEDITOR.NODE_ELEMENT && range.startContainer.is( { tr:1,table:1,tbody:1,thead:1,tfoot:1 } ) )
+ if ( range.startContainer.type == CKEDITOR.NODE_ELEMENT && range.startContainer.is( { tr: 1, table: 1, tbody: 1, thead: 1, tfoot: 1 } ) )
fixTableAfterContentsDeletion( range );
// If we're inserting a block at dtd-violated position, split
@@ -407,7 +407,7 @@
*
* @returns {Boolean}
*/
- isInline : function () {
+ isInline : function() {
return this.getDocument().equals( CKEDITOR.document );
},
@@ -521,7 +521,7 @@
// Pending until this editable has attached.
editor.once( 'contentDom', function() {
editor.focusManager.focus();
- });
+ } );
}
// Apply tab index on demand, with original direction saved.
@@ -578,7 +578,7 @@
evt.preventDefault();
} );
- var backspaceOrDelete = { 8:1,46:1 };
+ var backspaceOrDelete = { 8: 1, 46: 1 };
// Override keystrokes which should have deletion behavior
// on fully selected element . (#4047) (#7645)
@@ -735,13 +735,13 @@
this.attachListener( this, 'click', function( ev ) {
if ( ev.data.getTarget().is( 'input', 'select' ) )
ev.data.preventDefault();
- });
+ } );
// Prevent from editig textfield/textarea value.
this.attachListener( this, 'mouseup', function( ev ) {
if ( ev.data.getTarget().is( 'input', 'textarea' ) )
ev.data.preventDefault();
- });
+ } );
}
}
},
@@ -778,7 +778,7 @@
delete this.editor;
}
}
- });
+ } );
/**
* Create, retrieve or detach an editable element of the editor,
@@ -921,7 +921,7 @@
function isNotBubbling( fn, src ) {
return function( evt ) {
var other = CKEDITOR.dom.element.get( evt.data.$.toElement || evt.data.$.fromElement || evt.data.$.relatedTarget );
- if ( ! ( other && ( src.equals( other ) || src.contains( other ) ) ) )
+ if ( !( other && ( src.equals( other ) || src.contains( other ) ) ) )
fn.call( this, evt );
};
}
@@ -934,7 +934,7 @@
range = sel.getRanges()[ 0 ],
editable = sel.root,
path = range.startPath(),
- structural = { table:1,ul:1,ol:1,dl:1 };
+ structural = { table: 1, ul: 1, ol: 1, dl: 1 };
if ( path.contains( structural ) ) {
function guard( forwardGuard ) {
@@ -1030,7 +1030,7 @@
element.data( 'cke-editable', element.hasAttribute( 'contenteditable' ) ? 'true' : '1' );
element.setAttribute( 'contentEditable', false );
}
- });
+ } );
editor.on( 'selectionChange', function( evt ) {
if ( editor.readOnly )
@@ -1050,8 +1050,8 @@
!isDirty && editor.resetDirty();
}
- });
- });
+ } );
+ } );
CKEDITOR.on( 'instanceCreated', function( evt ) {
@@ -1083,8 +1083,8 @@
editable.changeAttr( 'aria-describedby', ariaDescId );
}
}
- });
- });
+ } );
+ } );
// #9222: Show text cursor in Gecko.
// Show default cursor over control elements on all non-IEs.
@@ -1093,7 +1093,7 @@
//
// Functions related to insertXXX methods
//
- var insert = (function() {
+ var insert = ( function() {
'use strict';
var DTD = CKEDITOR.dtd;
@@ -1572,7 +1572,7 @@
lineBreak = 0;
blockSibling = 0;
} else
- nodesData.push( { isElement:0,node:node,allowed:1 } );
+ nodesData.push( { isElement: 0, node: node, allowed: 1 } );
}
// Mark first node that cannot be inserted directly into startContainer
@@ -1656,7 +1656,7 @@
return node && checkIfElement( node ) && ( node.is( DTD.$removeEmpty ) || node.is( 'a' ) && !node.isBlockBoundary() );
}
- var blockMergedTags = { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1 };
+ var blockMergedTags = { p: 1, div: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, ul: 1, ol: 1, li: 1, pre: 1, dl: 1, blockquote: 1 };
// See rule 5. in TCs.
// Initial situation:
@@ -1721,7 +1721,7 @@
return 1;
firstBlockAscendant = range.startContainer.getAscendant( DTD.$block, 1 );
- if ( !firstBlockAscendant || !firstBlockAscendant.is( { div:1,p:1 } ) )
+ if ( !firstBlockAscendant || !firstBlockAscendant.is( { div: 1, p: 1 } ) )
return 0;
pos = firstBlockAscendant.getPosition( blockLimit );
@@ -1735,7 +1735,7 @@
return 1;
}
- var stripSingleBlockTags = { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1 },
+ var stripSingleBlockTags = { p: 1, div: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 },
inlineButNotBr = CKEDITOR.tools.extend( {}, DTD.$inline );
delete inlineButNotBr.br;
@@ -1777,7 +1777,7 @@
}
return insert;
- })();
+ } )();
function beforeInsert( editable ) {
// TODO: For unknown reason we must call directly on the editable to put the focus immediately.
@@ -1804,7 +1804,7 @@
// 1. Fixes a range which is a result of deleteContents() and is placed in an intermediate element (see dtd.$intermediate),
// inside a table. A goal is to find a closest | or | element and when this fails, recreate the structure of the table.
// 2. Fixes empty cells by appending bogus s or deleting empty text nodes in IE<=8 case.
- var fixTableAfterContentsDeletion = (function() {
+ var fixTableAfterContentsDeletion = ( function() {
// Creates an element walker which can only "go deeper". It won't
// move out from any element. Therefore it can be used to find | x | in cases like:
// x |
^...
@@ -1887,7 +1887,7 @@
}
// Found an empty txxx element - append tr.
- if ( deeperSibling.is( { tbody:1,thead:1,tfoot:1 } ) )
+ if ( deeperSibling.is( { tbody: 1, thead: 1, tfoot: 1 } ) )
deeperSibling = fixTableStructure( deeperSibling, 'tr', appendToStart );
// Found an empty tr element - append td/th.
@@ -1902,9 +1902,9 @@
range.moveToPosition( deeperSibling, appendToStart ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END );
};
- })();
+ } )();
-})();
+} )();
/**
* Whether the editor must output an empty value (`''`) if it's contents is made
diff --git a/core/editor.js b/core/editor.js
index 37065535575..bcc15a452dd 100644
--- a/core/editor.js
+++ b/core/editor.js
@@ -8,7 +8,7 @@
* editor instance.
*/
-(function() {
+( function() {
// Override the basic constructor defined at editor_basic.js.
Editor.prototype = CKEDITOR.editor.prototype;
CKEDITOR.editor = Editor;
@@ -279,7 +279,7 @@
// Call the load config again. This time the custom
// config is already cached and so it will get loaded.
loadConfig( editor );
- });
+ } );
}
return true;
@@ -304,7 +304,7 @@
}
onConfigLoaded( editor );
- });
+ } );
// The instance config may override the customConfig setting to avoid
// loading the default ~/config.js file.
@@ -399,7 +399,7 @@
function loadSkin( editor ) {
CKEDITOR.skin.loadPart( 'editor', function() {
loadLang( editor );
- });
+ } );
}
function loadLang( editor ) {
@@ -455,7 +455,7 @@
editor.fire( 'langLoaded' );
preloadStylesSet( editor );
- });
+ } );
}
// Preloads styles set file (config.stylesSet).
@@ -546,7 +546,7 @@
if ( requires && ( match = requires.match( removeRegex ) ) ) {
while ( ( name = match.pop() ) ) {
CKEDITOR.tools.setTimeout( function( name, pluginName ) {
- throw new Error( 'Plugin "' + name.replace( ',', '' ) + '" cannot be removed from the plugins list, because it\'s required by "' + pluginName + '" plugin.');
+ throw new Error( 'Plugin "' + name.replace( ',', '' ) + '" cannot be removed from the plugins list, because it\'s required by "' + pluginName + '" plugin.' );
}, 0, null, [ name, pluginName ] );
}
}
@@ -621,8 +621,8 @@
editor.status = 'loaded';
editor.fireOnce( 'loaded' );
CKEDITOR.fire( 'instanceLoaded', null, editor );
- });
- });
+ } );
+ } );
}
// Send to data output back to editor's associated element.
@@ -936,7 +936,7 @@
this.on( 'dataReady', function( evt ) {
evt.removeListener();
callback.call( evt.editor );
- });
+ } );
}
// Fire "setData" so data manipulation may happen.
@@ -1226,8 +1226,8 @@
this.fire( 'activeEnterModeChange' );
}
}
- });
-})();
+ } );
+} )();
/**
* The editor has no associated element.
diff --git a/core/editor_basic.js b/core/editor_basic.js
index 8a5d497ffb7..c79af93fed1 100644
--- a/core/editor_basic.js
+++ b/core/editor_basic.js
@@ -18,14 +18,14 @@ if ( !CKEDITOR.editor ) {
// "editor" param in CKEDITOR.event.fire. So, we override it to do that
// automaticaly.
CKEDITOR.editor.prototype.fire = function( eventName, data ) {
- if ( eventName in { instanceReady:1,loaded:1 } )
+ if ( eventName in { instanceReady: 1, loaded: 1 } )
this[ eventName ] = true;
return CKEDITOR.event.prototype.fire.call( this, eventName, data, this );
};
CKEDITOR.editor.prototype.fireOnce = function( eventName, data ) {
- if ( eventName in { instanceReady:1,loaded:1 } )
+ if ( eventName in { instanceReady: 1, loaded: 1 } )
this[ eventName ] = true;
return CKEDITOR.event.prototype.fireOnce.call( this, eventName, data, this );
diff --git a/core/env.js b/core/env.js
index c4d030806cf..6de7893e3c6 100644
--- a/core/env.js
+++ b/core/env.js
@@ -15,7 +15,7 @@ if ( !CKEDITOR.env ) {
* @class CKEDITOR.env
* @singleton
*/
- CKEDITOR.env = (function() {
+ CKEDITOR.env = ( function() {
var agent = navigator.userAgent.toLowerCase();
var opera = window.opera;
@@ -352,7 +352,7 @@ if ( !CKEDITOR.env ) {
env.cssClass += ' cke_hidpi';
return env;
- })();
+ } )();
}
// PACKAGER_RENAME( CKEDITOR.env )
diff --git a/core/event.js b/core/event.js
index 0addd1b9cc8..d37b52762fc 100644
--- a/core/event.js
+++ b/core/event.js
@@ -49,7 +49,7 @@ if ( !CKEDITOR.event ) {
}
};
- CKEDITOR.event.prototype = (function() {
+ CKEDITOR.event.prototype = ( function() {
// Returns the private events object for a given object.
var getPrivate = function( obj ) {
var _ = ( obj.getPrivate && obj.getPrivate() ) || obj._ || ( obj._ = {} );
@@ -242,7 +242,7 @@ if ( !CKEDITOR.event ) {
* @returns {Boolean/Object} A boolean indicating that the event is to be
* canceled, or data returned by one of the listeners.
*/
- fire: (function() {
+ fire: ( function() {
// Create the function that marks the event as stopped.
var stopped = 0;
var stopEvent = function() {
@@ -308,7 +308,7 @@ if ( !CKEDITOR.event ) {
return ret;
};
- })(),
+ } )(),
/**
* Fires an specific event in the object, releasing all listeners
@@ -383,5 +383,5 @@ if ( !CKEDITOR.event ) {
return ( event && event.listeners.length > 0 );
}
};
- })();
+ } )();
}
diff --git a/core/filter.js b/core/filter.js
index dcc8faaebc1..23583f15774 100644
--- a/core/filter.js
+++ b/core/filter.js
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
-(function() {
+( function() {
'use strict';
var DTD = CKEDITOR.dtd,
@@ -687,7 +687,7 @@
* @param {Boolean} [reverse] Whether to check modes in reverse order (used for shift enter mode).
* @returns {Number} Allowed enter mode.
*/
- getAllowedEnterMode: (function() {
+ getAllowedEnterMode: ( function() {
var tagsToCheck = [ 'p', 'div', 'br' ],
enterModes = {
p: CKEDITOR.ENTER_P,
@@ -715,7 +715,7 @@
return CKEDITOR.ENTER_BR;
};
- })()
+ } )()
};
// Apply ACR to an element
@@ -1129,7 +1129,7 @@
return obj;
}
- var validators = { styles:1,attributes:1,classes:1 },
+ var validators = { styles: 1, attributes: 1, classes: 1 },
validatorsRequired = {
styles: 'requiredStyles',
attributes: 'requiredAttributes',
@@ -1611,9 +1611,8 @@
if ( typeof form == 'string' )
element = form;
- else if ( form instanceof CKEDITOR.style ) {
+ else if ( form instanceof CKEDITOR.style )
left = form;
- }
else {
element = form[ 0 ];
left = form[ 1 ];
@@ -1845,9 +1844,9 @@
if ( existingClassesPattern.indexOf( cl ) == -1 )
el.classes.push( cl );
}
- } else {
+ } else
el.attributes[ attrName ] = defAttrs[ attrName ];
- }
+
}
for ( styleName in defStyles ) {
@@ -1857,7 +1856,7 @@
}
};
-})();
+} )();
/**
* Allowed content rules. This setting is used when
diff --git a/core/focusmanager.js b/core/focusmanager.js
index cb82d5834b6..80d07c5eeb2 100644
--- a/core/focusmanager.js
+++ b/core/focusmanager.js
@@ -8,7 +8,7 @@
* to handle the focus on editor instances..
*/
-(function() {
+( function() {
/**
* Manages the focus activity in an editor instance. This class is to be
* used mainly by UI elements coders when adding interface elements that need
@@ -151,9 +151,9 @@
clearTimeout( this._.timer );
var delay = CKEDITOR.focusManager._.blurDelay;
- if ( noDelay || !delay ) {
+ if ( noDelay || !delay )
doBlur.call( this );
- } else {
+ else {
this._.timer = CKEDITOR.tools.setTimeout( function() {
delete this._.timer;
doBlur.call( this );
@@ -224,7 +224,7 @@
};
-})();
+} )();
/**
* Fired when the editor instance receives the input focus.
diff --git a/core/htmldataprocessor.js b/core/htmldataprocessor.js
index 8b230841768..2922cb74d87 100644
--- a/core/htmldataprocessor.js
+++ b/core/htmldataprocessor.js
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
-(function() {
+( function() {
/**
* Represents an HTML data processor, which is responsible for translating and
* transforming the editor data on input and output.
@@ -322,7 +322,7 @@
// Append a filler right after the last line-break BR, found at the end of block.
function brFilter( isOutput ) {
- return function ( br ) {
+ return function( br ) {
// DO NOT apply the filer if parent's a fragment node.
if ( br.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT )
@@ -764,8 +764,8 @@
}
return fullAttr;
- }) + '>';
- });
+ } ) + '>';
+ } );
}
function protectElements( html, regex ) {
@@ -776,13 +776,13 @@
match = tag + unprotectRealComments( content ).replace( //g, '>' ) + '';
return '' + encodeURIComponent( match ) + '';
- });
+ } );
}
function unprotectElements( html ) {
return html.replace( encodedElementsRegex, function( match, encoded ) {
return decodeURIComponent( encoded );
- });
+ } );
}
function protectElementsNames( html ) {
@@ -807,13 +807,13 @@
'{C}' +
encodeURIComponent( match ).replace( /--/g, '%2D%2D' ) +
'-->';
- });
+ } );
}
function unprotectRealComments( html ) {
return html.replace( //g, function( match, data ) {
return decodeURIComponent( data );
- });
+ } );
}
function unprotectSource( html, editor ) {
@@ -821,15 +821,15 @@
return html.replace( //g, function( match, data ) {
return decodeURIComponent( data );
- }).replace( /\{cke_protected_(\d+)\}/g, function( match, id ) {
+ } ).replace( /\{cke_protected_(\d+)\}/g, function( match, id ) {
return store && store[ id ] || '';
- });
+ } );
}
function protectSource( data, editor ) {
var protectedHtml = [],
protectRegexes = editor.config.protectedSource,
- store = editor._.dataStore || ( editor._.dataStore = { id:1 } ),
+ store = editor._.dataStore || ( editor._.dataStore = { id: 1 } ),
tempRegex = /<\!--\{cke_temp(comment)?\}(\d*?)-->/g;
var regexes = [
@@ -847,25 +847,25 @@
// transform them when applying filters.
data = data.replace( ( //g ), function( match ) {
return '';
- });
+ } );
for ( var i = 0; i < regexes.length; i++ ) {
data = data.replace( regexes[ i ], function( match ) {
match = match.replace( tempRegex, // There could be protected source inside another one. (#3869).
function( $, isComment, id ) {
return protectedHtml[ id ];
- });
+ } );
// Avoid protecting over protected, e.g. /\{.*?\}/
return ( /cke_temp(comment)?/ ).test( match ) ? match : '';
- });
+ } );
}
data = data.replace( tempRegex, function( $, isComment, id ) {
return '';
- });
+ } );
// Different protection pattern is used for those that
// live in attributes to avoid from being HTML encoded.
@@ -873,10 +873,10 @@
return match.replace( //g, function( match, data ) {
store[ store.id ] = decodeURIComponent( data );
return '{cke_protected_' + ( store.id++ ) + '}';
- });
- });
+ } );
+ } );
}
-})();
+} )();
/**
* Whether a filler text (non-breaking space entity — ` `) will be
diff --git a/core/htmlparser.js b/core/htmlparser.js
index 78c08215900..9f97bb02aff 100644
--- a/core/htmlparser.js
+++ b/core/htmlparser.js
@@ -21,9 +21,9 @@ CKEDITOR.htmlParser = function() {
};
};
-(function() {
+( function() {
var attribsRegex = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,
- emptyAttribs = { checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1 };
+ emptyAttribs = { checked: 1, compact: 1, declare: 1, defer: 1, disabled: 1, ismap: 1, multiple: 1, nohref: 1, noresize: 1, noshade: 1, nowrap: 1, readonly: 1, selected: 1 };
CKEDITOR.htmlParser.prototype = {
/**
@@ -204,4 +204,4 @@ CKEDITOR.htmlParser = function() {
this.onText( html.substring( nextIndex, html.length ) );
}
};
-})();
+} )();
diff --git a/core/htmlparser/basicwriter.js b/core/htmlparser/basicwriter.js
index a7f617975be..948f9876b0b 100644
--- a/core/htmlparser/basicwriter.js
+++ b/core/htmlparser/basicwriter.js
@@ -9,7 +9,7 @@
* @class
* @todo
*/
-CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass({
+CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( {
/**
* Creates a basicWriter class instance.
*
@@ -149,4 +149,4 @@ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass({
return html;
}
}
-});
+} );
diff --git a/core/htmlparser/cdata.js b/core/htmlparser/cdata.js
index 8e76db1fb38..36a25326889 100644
--- a/core/htmlparser/cdata.js
+++ b/core/htmlparser/cdata.js
@@ -5,7 +5,7 @@
'use strict';
-(function() {
+( function() {
/**
* A lightweight representation of HTML CDATA.
@@ -45,4 +45,4 @@
writer.write( this.value );
}
} );
-})();
+} )();
diff --git a/core/htmlparser/element.js b/core/htmlparser/element.js
index 206b29098ab..a88b9afa25a 100644
--- a/core/htmlparser/element.js
+++ b/core/htmlparser/element.js
@@ -75,7 +75,7 @@ CKEDITOR.htmlParser.cssStyle = function() {
( styleText || '' ).replace( /"/g, '"' ).replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value ) {
name == 'font-family' && ( value = value.replace( /["']/g, '' ) );
rules[ name.toLowerCase() ] = value;
- });
+ } );
return {
@@ -88,9 +88,9 @@ CKEDITOR.htmlParser.cssStyle = function() {
*/
populate: function( obj ) {
var style = this.toString();
- if ( style ) {
+ if ( style )
obj instanceof CKEDITOR.dom.element ? obj.setAttribute( 'style', style ) : obj instanceof CKEDITOR.htmlParser.element ? obj.attributes.style = style : obj.style = style;
- }
+
},
/**
@@ -108,7 +108,7 @@ CKEDITOR.htmlParser.cssStyle = function() {
};
/** @class CKEDITOR.htmlParser.element */
-(function() {
+( function() {
// Used to sort attribute entries in an array, where the first element of
// each object is the attribute name.
var sortAttribs = function( a, b ) {
@@ -510,4 +510,4 @@ CKEDITOR.htmlParser.cssStyle = function() {
( typeof condition == 'string' ? el.name == condition : el.name in condition );
};
}
-})();
+} )();
diff --git a/core/htmlparser/filter.js b/core/htmlparser/filter.js
index 10f242d1822..21c21866552 100644
--- a/core/htmlparser/filter.js
+++ b/core/htmlparser/filter.js
@@ -5,7 +5,7 @@
'use strict';
-(function() {
+( function() {
/**
* Filter is a configurable tool for transforming and filtering {@link CKEDITOR.htmlParser.node nodes}.
* It is mainly used during data processing phase which is done not on real DOM nodes,
@@ -131,7 +131,7 @@
options = {};
// Add the elementNames.
- if ( rules.elementNames)
+ if ( rules.elementNames )
this.elementNameRules.addMany( rules.elementNames, priority, options );
// Add the attributeNames.
@@ -394,7 +394,7 @@
return !context.nonEditable || rule.options.applyToAll;
}
-})();
+} )();
/**
* @class CKEDITOR.htmlParser.filterRulesDefinition
diff --git a/core/htmlparser/fragment.js b/core/htmlparser/fragment.js
index 01a73fb57a1..dd91ecccff0 100644
--- a/core/htmlparser/fragment.js
+++ b/core/htmlparser/fragment.js
@@ -34,15 +34,15 @@ CKEDITOR.htmlParser.fragment = function() {
};
};
-(function() {
+( function() {
// Block-level elements whose internal structure should be respected during
// parser fixing.
- var nonBreakingBlocks = CKEDITOR.tools.extend( { table:1,ul:1,ol:1,dl:1 }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl );
+ var nonBreakingBlocks = CKEDITOR.tools.extend( { table: 1, ul: 1, ol: 1, dl: 1 }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl );
- var listBlocks = { ol:1,ul:1 };
+ var listBlocks = { ol: 1, ul: 1 };
// Dtd of the fragment element, basically it accept anything except for intermediate structure, e.g. orphan .
- var rootDtd = CKEDITOR.tools.extend( {}, { html:1 }, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { style:1,script:1 } );
+ var rootDtd = CKEDITOR.tools.extend( {}, { html: 1 }, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { style: 1, script: 1 } );
function isRemoveEmpty( node ) {
// Keep marked element event if it is empty.
@@ -628,4 +628,4 @@ CKEDITOR.htmlParser.fragment = function() {
return context || {};
}
};
-})();
+} )();
diff --git a/core/htmlparser/node.js b/core/htmlparser/node.js
index 3e517c34660..a0c618002f5 100644
--- a/core/htmlparser/node.js
+++ b/core/htmlparser/node.js
@@ -5,7 +5,7 @@
'use strict';
-(function() {
+( function() {
/**
* A lightweight representation of HTML node.
*
@@ -147,4 +147,4 @@
return context || {};
}
};
-})();
+} )();
diff --git a/core/htmlparser/text.js b/core/htmlparser/text.js
index d3409be66dc..5e29a12a53c 100644
--- a/core/htmlparser/text.js
+++ b/core/htmlparser/text.js
@@ -5,7 +5,7 @@
'use strict';
-(function() {
+( function() {
/**
* A lightweight representation of HTML text.
*
@@ -67,4 +67,4 @@
writer.text( this.value );
}
} );
-})();
+} )();
diff --git a/core/keystrokehandler.js b/core/keystrokehandler.js
index cbda00184c1..9cd08350e31 100644
--- a/core/keystrokehandler.js
+++ b/core/keystrokehandler.js
@@ -37,7 +37,7 @@ CKEDITOR.keystrokeHandler = function( editor ) {
return this;
};
-(function() {
+( function() {
var cancel;
var onKeyDown = function( event ) {
@@ -91,7 +91,7 @@ CKEDITOR.keystrokeHandler = function( editor ) {
domObject.on( 'keypress', onKeyPress, this );
}
};
-})();
+} )();
/**
* A list associating keystrokes to editor commands. Each element in the list
diff --git a/core/lang.js b/core/lang.js
index 4fe937baaaa..9a075c6753a 100644
--- a/core/lang.js
+++ b/core/lang.js
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
-(function() {
+( function() {
var loadedLangs = {};
/**
@@ -18,12 +18,17 @@
*
* alert( CKEDITOR.lang.en ); // 1
*/
- languages: { af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,'zh-cn':1,zh:1 },
+ languages: { af: 1, ar: 1, bg: 1, bn: 1, bs: 1, ca: 1, cs: 1, cy: 1, da: 1, de: 1, el: 1,
+ 'en-au': 1, 'en-ca': 1, 'en-gb': 1, en: 1, eo: 1, es: 1, et: 1, eu: 1, fa: 1, fi: 1, fo: 1,
+ 'fr-ca': 1, fr: 1, gl: 1, gu: 1, he: 1, hi: 1, hr: 1, hu: 1, id: 1, is: 1, it: 1, ja: 1, ka: 1,
+ km: 1, ko: 1, ku: 1, lt: 1, lv: 1, mk: 1, mn: 1, ms: 1, nb: 1, nl: 1, no: 1, pl: 1, 'pt-br': 1,
+ pt: 1, ro: 1, ru: 1, si: 1, sk: 1, sl: 1, sq: 1, 'sr-latn': 1, sr: 1, sv: 1, th: 1, tr: 1, ug: 1,
+ uk: 1, vi: 1, 'zh-cn': 1, zh: 1 },
/**
* The list of languages that are written Right-To-Left (RTL) and are supported by the editor.
*/
- rtl: { ar:1,fa:1,he:1,ku:1,ug:1 },
+ rtl: { ar: 1, fa: 1, he: 1, ku: 1, ug: 1 },
/**
* Loads a specific language file, or auto detects it. A callback is
@@ -92,4 +97,4 @@
}
};
-})();
+} )();
diff --git a/core/loader.js b/core/loader.js
index 81756072d40..ef4dec57795 100644
--- a/core/loader.js
+++ b/core/loader.js
@@ -18,7 +18,7 @@ if ( !CKEDITOR.loader ) {
* @class
* @singleton
*/
- CKEDITOR.loader = (function() {
+ CKEDITOR.loader = ( function() {
// Table of script names and their dependencies.
var scripts = {
'_bootstrap': [ 'config', 'creators/inline', 'creators/themedui', 'editable', 'ckeditor', 'plugins', 'scriptloader', 'style', 'tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'dom/comment', 'dom/elementpath', 'dom/text', 'dom/rangelist', 'skin' ],
@@ -54,7 +54,7 @@ if ( !CKEDITOR.loader ) {
'htmldataprocessor': [ 'htmlparser', 'htmlparser/basicwriter', 'htmlparser/fragment', 'htmlparser/filter' ],
'htmlparser': [],
'htmlparser/comment': [ 'htmlparser', 'htmlparser/node' ],
- 'htmlparser/element': [ 'htmlparser', 'htmlparser/fragment','htmlparser/node' ],
+ 'htmlparser/element': [ 'htmlparser', 'htmlparser/fragment', 'htmlparser/node' ],
'htmlparser/fragment': [ 'htmlparser', 'htmlparser/comment', 'htmlparser/text', 'htmlparser/cdata' ],
'htmlparser/text': [ 'htmlparser', 'htmlparser/node' ],
'htmlparser/cdata': [ 'htmlparser', 'htmlparser/node' ],
@@ -76,7 +76,7 @@ if ( !CKEDITOR.loader ) {
'creators/inline': []
};
- var basePath = (function() {
+ var basePath = ( function() {
// This is a copy of CKEDITOR.basePath, but requires the script having
// "_source/loader.js".
if ( CKEDITOR && CKEDITOR.basePath )
@@ -107,7 +107,7 @@ if ( !CKEDITOR.loader ) {
}
return path;
- })();
+ } )();
var timestamp = ( CKEDITOR && CKEDITOR.timestamp ) || ( new Date() ).valueOf(); // %REMOVE_LINE%
/* // %REMOVE_LINE%
@@ -237,7 +237,7 @@ if ( !CKEDITOR.loader ) {
}
}
};
- })();
+ } )();
}
// Check if any script has been defined for autoload.
diff --git a/core/plugins.js b/core/plugins.js
index 16565d87627..4a54046abd4 100644
--- a/core/plugins.js
+++ b/core/plugins.js
@@ -87,7 +87,7 @@ CKEDITOR.plugins.load = CKEDITOR.tools.override( CKEDITOR.plugins.load, function
loadPlugins.call( this, name );
};
-});
+} );
/**
* Loads a specific language file, or auto detect it. A callback is
diff --git a/core/scriptloader.js b/core/scriptloader.js
index f95f4f3cb1f..ebca51861c2 100644
--- a/core/scriptloader.js
+++ b/core/scriptloader.js
@@ -14,7 +14,7 @@
* @class
* @singleton
*/
-CKEDITOR.scriptLoader = (function() {
+CKEDITOR.scriptLoader = ( function() {
var uniqueScripts = {},
waitingList = {};
@@ -113,7 +113,7 @@ CKEDITOR.scriptLoader = (function() {
// Create the