The API model used to edit videos.
Replaces the element itself with the HTML String passed as an argument.
var video = editor.getAPIModelById('id'); video.replace('<span>Video replaced</span>'); |
Removes the Element itself.
var video = editor.getAPIModelById('id'); video.remove(); |
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'); |
Sets the width of the video.
var video = editor.getAPIModelById('id'); video.setWidth(200); video.setWidth(100, '%'); |
Sets the height of the video.
var video = editor.getAPIModelById('id'); video.setHeight(200); video.setHeight(100, 'px'); |