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)
my error
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1967
Wrap built-in component with div html
I am trying to wrap the video component specifically for Youtube's <iframe> with a parent <div class="embed-responsive embed-responsive-16b...
Issue #3626
How to set src of video tag at dynamic?
Hi @artf , Hi I have drag and drop video tag and button from blockmanager, On Clicking the button , I need to change the url to src. But no...
Issue #1388
Update the style of selected component
I'm trying to update the css of selected element. Example: Selected element: <div id="inul" class='class1'>Hello</div> the above code was r...
Issue #2274
[QUESTION] How to load children of a readonly component?
I'm trying to mount a readonly component (draggable, droppable etc all set to false) and allow the user to edit child components inside. Fo...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.