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,
- 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)
- 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).
- 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)
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
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.
Issue #1762
image not change while we fetch html using editor.getHtml()
Hello @artf I am using grapes.js for my website-builder tool into my website. While i double click on any image the asset-manager will open...
Issue #1844
Remove upload image option and disable (x) icon for default images
I want to remove the "Drop files here or click to upload" section and also disable the (x) cross icon next tothe default images, not allowi...
Issue #1780
How to change extra dropdown for link change trait
Hello @artf , I want to give one more functionality to user like user can change any link with default links drop down. In above image i wa...
Issue #1929
Loads asset manager, but assets not working
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 refle...
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.