Closed josfh2005 closed 3 years ago
Probably better to just define a custom block like described here https://github.com/artf/grapesjs-mjml/issues/195#issuecomment-673664804 that inserts a mj-image which links to a video
Thanks @DRoet,
Now i am doing just that, I put an attribute
Finally made work like this...
editor.DomComponents.addType('mj-video', { isComponent: el => el.tagName === 'MJ-IMAGE' && el.getAttribute('type') === 'video', extend: 'mj-image' });
For anyone who may need this!
Hi,
BTW awesome job with grapesjs.
I am trying to extend mj-image component to create mj-video, which will take an youtube/vimeo URL an present the video preview frame in the image and the url to the video.
But so far nothing is working.
comps.addType('mj-video', { isComponent: el => el.tagName === 'mj-video'.toUpperCase(), extend: 'mj-image' });
I am using grapes inside Angular 8 app, and the mjml plugin as an external link.
What else should I need?
Thanks in advanced.