grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Custom HTML type in video traits

Open Deepak813 opened this issue 9 years ago • 8 comments

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.

Deepak813 avatar Dec 02 '17 06:12 Deepak813

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)?

ryandeba avatar Dec 04 '17 19:12 ryandeba

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.

Deepak813 avatar Dec 05 '17 06:12 Deepak813

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.

ryandeba avatar Dec 05 '17 23:12 ryandeba

Hi @ryandeba,

Thanks for the message.

Yes sure,i'll show the example of Custom HTML embed video type in template builder.

Deepak813 avatar Dec 06 '17 08:12 Deepak813

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"

artf avatar Dec 08 '17 10:12 artf

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.

Deepak813 avatar Dec 08 '17 10:12 Deepak813

https://github.com/artf/grapesjs-custom-code

artf avatar Sep 04 '18 22:09 artf

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.

lock[bot] avatar Sep 17 '19 06:09 lock[bot]