image/imageresize/utils/getselectedimagewidthinunits
module
Functions
getSelectedImageWidthInUnits( editor, targetUnit ) → null | DimensionWithUnitinternalmodule:image/imageresize/utils/getselectedimagewidthinunits~getSelectedImageWidthInUnitsReturns 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.Copy codeParameters
editor : EditorEditor instance.
targetUnit : stringUnit in which dimension will be returned.
Returns
null | DimensionWithUnitParsed image width after resize (with unit).