Issue #601Opened December 2, 2017by Deepak8130 reactions

Custom HTML type in video traits

Question

Did we get the Custom HTML type in video traits so that user can able to enter the iframe code and it will embed in the html.

As,all the famous editor have this feature which is common one in video category.

Is this video traits is in roadmap.

As we have created this new component but that conflicts with the existing video traits.

Answers (3)

ryandebaDecember 4, 20170 reactions

Hi @Deepak813,

This doesn't really sound like a video component to me if you let users enter in whatever iframe code that they want. If the component lets you enter custom "iframe code", it seems like it would also let them enter some non-iframe HTML (<div>foobar</div>) or even valid iframe HTML that doesn't point to a video (<iframe src="http://github.com"></iframe>). How would you want to prevent that? Do you have an example from another editor that you could link to? I'd be curious to see how those work, maybe I'm just not thinking through it very well.

Have you considered just having an iframe component that exposes the src as a trait? Or maybe a "Custom HTML" component that lets users enter whatever HTML code they want (example: https://github.com/ryandeba/grapesjs-html-block)?

Deepak813December 5, 20170 reactions

Hi @ryandeba,

Thanks for the message.

The exact scenario in Custom HTML type in video is very simple.If user enter any non-iframe HTML then we will display the error message just as shown in vimeo video type or if user enter any iframe HTML that doesn't point to a video (<iframe src="http://github.com"></iframe>), then whatever iframe src contains it will display that irrespective of valid or non valid src. If its valid src then video is displayed or if its not valid then it displays blank iframe.

Also, as we are providing full flexibility to user in template builder then what user enter its his or her choose to do that. If you want further assistant in that then i'll show you the example where every big template builder contains this feature in video element.

ryandebaDecember 6, 20170 reactions

Thank you for the additional details @Deepak813 - I think I have a better idea of what you're trying to accomplish now. I would still be interested in seeing an example if you have one available. In the meantime, I will give some thought into how to achieve this.

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.