CKFinder 3 Documentation

CKFinder.Util.Util

Utility class

Defined By

Methods

CKFinder.Util.Util
( items, callback, [thisArg] )
...

Parameters

  • items : Array
  • callback : Function
  • thisArg : Object (optional)
CKFinder.Util.Util
( text ) : String
Converts special characters to be used as inline css parameter, mainly url resources ...

Converts special characters to be used as inline css parameter, mainly url resources

Parameters

  • text : String

    String to escape

Returns

  • String
CKFinder.Util.Util
( text ) : String
Escapes HTML tags and special characters ...

Escapes HTML tags and special characters

Parameters

  • text : String

    The string to be escaped.

Returns

  • String

    The escaped string.

CKFinder.Util.Util
( ) : {}
Parses url params for runtime config. ...

Parses url params for runtime config.

Returns

  • {}
CKFinder.Util.Util
( ) : Boolean
Checks if CKFinder runs in modal mode. ...

Checks if CKFinder runs in modal mode.

Returns

  • Boolean
CKFinder.Util.Util
( ) : Boolean
Checks if CKFinder runs in popup mode. ...

Checks if CKFinder runs in popup mode.

Returns

  • Boolean
CKFinder.Util.Util
( evt, shortcut ) : boolean
Checks if given event is shortcut. ...

Checks if given event is shortcut. On mac it detects CMD key as CTRL key.

// User pressed ALT+CTRL+A on keyboard or ALT+CMD+A on Mac finder.on( 'keydown:65', function( evt ) { // Order is irrelevant console.log( finder.util.isShortCut( evt, 'alt+ctrl' ) ); // logs true console.log( finder.util.isShortCut( evt, 'ctrl+alt' ) ); // logs true

   // Checks if all required keys are pressed but not others
   console.log( finder.util.isShortCut( evt, '' ) ); // logs false
   console.log( finder.util.isShortCut( evt, 'alt' ) ); // logs false
   console.log( finder.util.isShortCut( evt, 'alt+shift' ) ); // logs false
   console.log( finder.util.isShortCut( evt, 'ctrl+shift' ) ); // logs false

} );

Parameters

  • evt : jQuery.Event

    jQuery Event

  • shortcut : String

    An expected special keys combination

Returns

  • boolean
CKFinder.Util.Util
( ) : Boolean
Checks if CKFinder runs in widget mode. ...

Checks if CKFinder runs in widget mode.

Returns

  • Boolean
CKFinder.Util.Util
( text ) : String
Converts special characters to be used as jquery/JavaScript css parameter, mainly url resources ...

Converts special characters to be used as jquery/JavaScript css parameter, mainly url resources

Parameters

  • text : String

    String to escape

Returns

  • String
CKFinder.Util.Util
( url )
Returns folder from path ...

Returns folder from path

Parameters

  • url : Object
CKFinder.Util.Util
( length, [charset] ) : String
Creates a random string with requested length. ...

Creates a random string with requested length.

Parameters

  • length : Number

    String length

  • charset : String (optional)

    Charset to use

Returns

  • String
CKFinder.Util.Util
( params ) : String
Converts object to URL encoded string with parameters ...

Converts object to URL encoded string with parameters

Parameters

  • params : Object

Returns

  • String

    var url = finder.util.toGet( { param1 : 'a' , param2 : 'b' } ); // url contains 'param1=a&param2=b'

CKFinder.Util.Util
( url )
Returns url relative to CKFinder installation path or full url if starts with http ...

Returns url relative to CKFinder installation path or full url if starts with http

Parameters

  • url : String