image/imageresize/utils/getselectedimagewidthinunits
module
Functions
-
getSelectedImageWidthInUnits( editor, targetUnit ) → null | DimensionWithUnit
internalmodule:image/imageresize/utils/getselectedimagewidthinunits~getSelectedImageWidthInUnits
Returns image width in specified units. It is width of image after resize.
* If image is not selected or command is disabled then `null` will be returned. * If image is not fully loaded (and it is impossible to determine its natural size) then `null` will be returned. * If `targetUnit` percentage is passed then it will return width percentage of image related to its accessors.
Parameters
editor : Editor
Editor instance.
targetUnit : string
Unit in which dimension will be returned.
Returns
null | DimensionWithUnit
Parsed image width after resize (with unit).