Issue #2305Opened October 2, 2019by rajasubburaj1 reactions

Wrap and UnWrap function is not working in Grapesjs selected element

Question

Code SnippetTEXT
if(data.component.get('tagName') === 'img') { 

							const selectedComponent = editor.getSelected();
							const href = this.getHref();
							const childHtml =`<a href="${href}"></a>`
							$(`img#${selectedComponent.ccid}`).wrap(childHtml);

							data.component.view.render();

							editor.Modal.close();
						}

Answers (1)

pouyamiralayiOctober 2, 20191 reactions

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.