Issue #2308Opened October 5, 2019by rajasubburaj0 reactions

Image is not resizing after creating a link for image

Question

let href = this.getHref();
let title = this.title;
let childHtml =`<a id="${selectedComponent.ccid}" title="${title}" href="${href}" target="_blank" class="gjs-comp-selected">${selectedComponent.view.el['outerHTML']}</a>`;
const coll = selectedComponent.collection;
const at = coll.indexOf(selectedComponent);
coll.remove(selectedComponent);
coll.add(childHtml, { at });
selectedComponent.view.render();```

Answers (1)

artfOctober 6, 20190 reactions

You're flattening the component by doing this selectedComponent.view.el['outerHTML'] and so you're removing all its properties. Read more about how Components work.

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.