Issue #2949Opened August 10, 2020by v8jupiter1 reactions

REMOVE: How to wrap html of video component into 2 div`s, and why toHtml not called?

Question

Hello, Can someone help me. v0.16.17 I need to change html for video component to structure:

<div class='1'>
     <div class='2'>
    <iframe></iframe>
</div>
</div>

I am trying to override toHtml method but they never called...

` // Get DomComponents module let comps = editor.DomComponents; let bm = editor.BlockManager;

// Get the model and the view from the default Component type let originalVideo = comps.getType('video'); let oModel = originalVideo.model;

// The input will be the Component type ID comps.addType('video', { // Define the Model model: oModel.extend({ defaults : { ...oModel.prototype.defaults, provider: 'gVideo', gVideoUrl: 'https://www.sdfsgdfgdgdfgdfgdg.com/v.php', classes: ['embed-responsive', 'embed-responsive-16by9'], tagName: 'iframe', }, toHTML() { console.log(123); }, `

Answers (1)

v8jupiterAugust 10, 20201 reactions

my error

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.