Issue #1719Opened January 9, 2019by AkibDeraiya1231 reactions

Event while click on image from asset modal

Question

Hello @artf , Hope you are doing well.

I am working on asset-manager. I have total 5 images as a default asset-manager image.

I want to do like,

  1. When user click on any default image from template then i want to change this image's id (Want to know about this how can i change)
  2. Then once asset manager pop-up opens and user can select any image and then that clicked image will be change with target image(This is working fine).
  3. When this asset manager will close then also need to get event that notify like modal is closed and on which image tag i had clicked. (Want to know about this event.)

i had tried with this event for change id, but not worked

editor.on("run:open-assets", function () {
  // Here i can get the target
  editor.getSelected().set('id', 'custom-image')
})

Answers (2)

artfJanuary 14, 20191 reactions

i had tried with this event for change id, but not worked

You should use setId method

When this asset manager will close then also need to get event that notify like modal is closed and on which image tag i had clicked. (Want to know about this event.)

You can make use of stop:open-assets event

lock[bot]January 14, 20200 reactions

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

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.