CKEditor 4 Documentation

CKEDITOR.plugins.image2

Files

A set of Enhanced Image (image2) plugin helpers.

Defined By

Methods

CKEDITOR.plugins.image2
view source
( image ) : Boolean
Checks whether the current image ratio matches the natural one by comparing dimensions. ...

Checks whether the current image ratio matches the natural one by comparing dimensions.

Parameters

Returns

  • Boolean
CKEDITOR.plugins.image2
view source
( ) : Function
Returns an attribute getter function. ...

Returns an attribute getter function. Default getter comes from the Link plugin and is documented by CKEDITOR.plugins.link.getLinkAttributes.

Note: It is possible to override this method and use a custom getter e.g. in the absence of the Link plugin.

Note: If a custom getter is used, a data model format it produces must be compatible with CKEDITOR.plugins.link.getLinkAttributes.

Note: A custom getter must understand the data model format produced by getLinkAttributesParser to work correctly.

Available since: 4.5.5

Returns

  • Function

    A function that gets (composes) link attributes.

CKEDITOR.plugins.image2
view source
( ) : Function
Returns an attribute parser function. ...

Returns an attribute parser function. Default parser comes from the Link plugin and is documented by CKEDITOR.plugins.link.parseLinkAttributes.

Note: It is possible to override this method and use a custom parser e.g. in the absence of the Link plugin.

Note: If a custom parser is used, a data model format produced by the parser must be compatible with getLinkAttributesGetter.

Note: If a custom parser is used, it should be compatible with the CKEDITOR.plugins.link.parseLinkAttributes data model format. Otherwise the Link plugin dialog may not be populated correctly with parsed data. However as long as Enhanced Image is not used with the Link plugin dialog, any custom data model will work, being stored as an internal property of Enhanced Image widget's data only.

Available since: 4.5.5

Returns

  • Function

    A function that parses attributes.

CKEDITOR.plugins.image2
view source
( image ) : Object
Returns natural dimensions of the image. ...

Returns natural dimensions of the image. For modern browsers it uses natural(Width|Height). For old ones (IE8) it creates a new image and reads the dimensions.

Parameters

Returns

  • Object