Sign up (with export icon)

media-embed/mediaembedresize/utils/getselectedmediaembedwidthinunits

Api-module iconmodule

Functions

  • Chevron-right icon

    getSelectedMediaEmbedWidthInUnits( editor, targetUnit ) → DimensionWithUnit | null
    internal

    Returns media embed width in specified units after resize.

    * If no media embed is selected or command is disabled, `null` will be returned.
    * If `targetUnit` percentage is passed then it will return width percentage relative to its ancestor.
    
    Copy code

    Parameters

    editor : Editor

    Editor instance.

    targetUnit : string

    Unit in which dimension will be returned.

    Returns

    DimensionWithUnit | null

    Parsed media embed width after resize (with unit).