Class: ImageTag

ImageTag


new ImageTag(publicId, options)

Creates an HTML (DOM) Image tag using Cloudinary as the source.

Parameters:
Name Type Argument Description
publicId string <optional>
options Object <optional>

Extends

Methods


#attributes()

Get the attributes of the tag.

Inherited From:
Returns: Object

attributes

Type
Object

#getAttr(name)

Get the value of the tag attribute name

Parameters:
Name Type Description
name string

the name of the attribute

Inherited From:
Returns: *
Type
*

#getOption(name)

Get the value of option name

Parameters:
Name Type Description
name string

the name of the option

Inherited From:
Returns: *

Returns the value of the option

Type
*

#getOptions()

Get all options related to this tag.

Inherited From:
Returns: Object

the options

Type
Object

#removeAttr(name)

Remove the tag attributed named name

Parameters:
Name Type Description
name string

the name of the attribute

Inherited From:
Returns: *
Type
*

#setAttr(name, value)

Set a tag attribute named name to value

Parameters:
Name Type Description
name string

the name of the attribute

value string

the value of the attribute

Inherited From:

#toAttribute(key, value)

Represent the given key and value as an HTML attribute.

Parameters:
Name Type Description
key string

attribute name

value * | boolean

the value of the attribute. If the value is boolean true, return the key only.

Inherited From:
Returns: string

the attribute

Type
string

#toDOM()

Creates a DOM object representing the tag.

Inherited From:
Returns: Element
Type
Element

#toHtml()

Generates an HTML representation of the tag.

Inherited From:
Returns: string

Returns HTML in string format

Type
string