Issue #1929πŸ’¬ AnsweredOpened March 27, 2019by sakshigarg92 reactions

Loads asset manager, but assets not working

Quick answerby prashant2018❀ 1

Click on the image you want to be replaced, in developer console write the following code snippet: You will see the selected image gets changed. The key here is target: editor.getSelected() , the selected image is treated as the target for the new image to take it's place. You need to trigger the above code when the p...

Read full answer below ↓

Question

I'm using the pencil icon to trigger the asset manager. The triggering works fine but when I click on any of the images, no change is reflected in my image component. It shows me the existing photo even if I select a different image.

Answers (3)

prashant2018β€’ March 28, 2019

Click on the image you want to be replaced, in developer console write the following code snippet: You will see the selected image gets changed. The key here is target: editor.getSelected() , the selected image is treated as the target for the new image to take it's place. You need to trigger the a...

artfβ€’ March 30, 2019
tb.unshift({
	command: editor => editor.runCommand('open-assets', {
    	target: editor.getSelected(),
	}),
    label: toolbarIcon
});
lock[bot]β€’ April 2, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.