Video extends Element

The API model used to edit videos.

Methods


replace(html)

Replaces the element itself with the HTML String passed as an argument.

var video = editor.getAPIModelById('id');
video.replace('<span>Video replaced</span>');

remove()

Removes the Element itself.

var video = editor.getAPIModelById('id');
video.remove();

setSrc(url)

Set the src attribute of the video to the url passed as an argument.

var video = editor.getAPIModelById('id');
video.setSrc('https://youtu.be/Mp3uS3nDyyI');

setWidth(value[, unit = 'px']);

Sets the width of the video.

var video = editor.getAPIModelById('id');
video.setWidth(200);
video.setWidth(100, '%');

setHeight(value[, unit = 'px']);

Sets the height of the video.

var video = editor.getAPIModelById('id');
video.setHeight(200);
video.setHeight(100, 'px');