Media (media-embed)
@ckeditor/ckeditor5-media-embed/src/mediaregistry
Represents media defined by the provider configuration.
It can be rendered to the view element and used in the editing or data pipeline.
Filtering
Properties
-
_match : Object
module:media-embed/mediaregistry~Media#_match
The output of the
RegExp.match
which validated theurl
of this media. -
_previewRenderer : function
module:media-embed/mediaregistry~Media#_previewRenderer
The function returning the HTML string preview of this media.
-
url : String
module:media-embed/mediaregistry~Media#url
The URL this Media instance represents.
Methods
-
_getPlaceholderHtml() → String
module:media-embed/mediaregistry~Media#_getPlaceholderHtml
Returns the placeholder HTML when the media has no content preview.
Returns
String
-
_getPreviewHtml( writer, options = { [options.renderForEditingView] } ) → String
module:media-embed/mediaregistry~Media#_getPreviewHtml
Returns the HTML string of the media content preview.
Parameters
writer : DowncastWriter
The view writer used to produce a view element.
options : Object
-
Properties
[ options.renderForEditingView ] : Boolean
Returns
String
-
_getValidUrl( url ) → String | null
module:media-embed/mediaregistry~Media#_getValidUrl
Returns the full URL to the specified media.
Parameters
url : String
The URL of the media.
Returns
String | null
-
_t()
module:media-embed/mediaregistry~Media#_t
Shorthand for
t
.Related:
-
getViewElement( writer, options = { [options.elementName], [options.renderMediaPreview], [options.renderForEditingView] } ) → Element
module:media-embed/mediaregistry~Media#getViewElement
Returns the view element representation of the media.
Parameters
writer : DowncastWriter
The view writer used to produce a view element.
options : Object
-
Properties
[ options.elementName ] : String
[ options.renderMediaPreview ] : Boolean
[ options.renderForEditingView ] : Boolean
Returns
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.