MediaLoader Class
Handles retrieval and injection of media in articles and pages
Constructor
MediaLoader
()
Item Index
Properties
Methods
getMediaTemplate
(
-
options -
cb
Retrieves the media template for rendering media
Parameters:
-
optionsObject-
[mediaTemplatePath='elements/media']String optional
-
-
cbFunction
onMediaAvailable
(
-
articleLayout -
options -
cb
Parameters:
-
articleLayoutString -
optionsObject -
cbFunction
replaceMediaTag
(
-
layout -
mediaTemplate -
mediaCache -
cb
Replaces an article or page layout's ^media_display^ tag with a media embed
Parameters:
-
layoutStringThe HTML layout of the article or page
-
mediaTemplateStringThe template of the media embed
-
mediaCacheObject -
cbFunctionCallback function
scanForFlags
(
Array
-
layout
Scans a string for media flags then parses them to return an array of each one that was found
Parameters:
-
layoutString
Returns:
Array:
start
(
-
articleLayout -
[options] -
cb
Processes an article or page to insert media
Parameters:
-
articleLayoutStringThe HTML layout of the article or page
-
[options]Object optional -
cbFunction
