Custom HTML type in video traits
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.
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)?
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 (), 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.
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.
Hi @ryandeba,
Thanks for the message.
Yes sure,i'll show the example of Custom HTML embed video type in template builder.
I totally agree about adding "Custom Code" block/component but confused too about this in the video category, would be cool to see some example of "Custom HTML embed video type"
Hi @artf,
Thanks for the message.
Yes sure,i'll show the example of Custom HTML embed video type in template builder.Just give me few time to provide you the exact video.we have multiple template builder that contain Custom HTML Video type.
https://github.com/artf/grapesjs-custom-code
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.