Issue #1572Opened November 10, 2018by crypto-dump0 reactions

Issue when adding video block manually

Question

I added Video Block manually like this.

Code SnippetTEXT
<pre>
blockManager.add('video', {
	label: 'Video',
	category: 'Media',
	attributes: {class: 'fa fa-youtube-play'},
	content: {
		type: 'video',
		classes: ['website-media', 'website-video'],
		//traits: ['data-panoramic'],
		resizable: 0,
		draggable: '.website-cell, .website-block, .video-container, .media-container',
		style: {
			width: '100%',
			height: 'auto'
		}
	},
});
</pre>

It seems this produce this element when I drop the video block to editor.
`<div class="website-media website-video" data-gjs-type="video" onmousedown="return false">`
`          <video src="" class="gjs-no-pointer" style="height: 100%; width: 100%;"></video>`
`</div>`
**But the height of video element is different every time when I add several video blocks,**

Answers (2)

artfNovember 16, 20180 reactions

The style you see on <video> is only applied in canvas, your styles are applied to the wrapper and you should see them correctly applied in the export code

lock[bot]November 16, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.