How to display src of image component?
Question
hi @artf i want to display my image when i drag and drop image component
here is my code
`bm.add( 'image', {
label: opt.imageBlkLabel,
category: opt.categoryElementsLabel,
content: {
type: 'image',
src: 'http://placehold.it/250x150/78c5d6/fff/',
style: {color:'black'},
},
attributes: {
class:'gjs-fonts gjs-f-image'
}
});`
i used this with the latest version of grapesjs it stops working with the latest version
when i drag and drop image component on canvas it appears nothing but element is still on canvas
and when i click on toggle image button 2 times it gives me result as expected.Answers (1)
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 #1471
[Question] Blockmanager and Image
Hi! I use this code to add a new block: blockManager.add("image", { label: 'Image', category: 'Basic', attributes: { class: "gjs-fonts gjs-...
Issue #555
Add external script in script while creating new component
Hello @artf How can I pass external script link while creating a component? like this way, bm.add('test-block2', { label: 'Test block2', at...
Issue #862
Jquery Image Viewer plugin in GrapesJs custom Block
I want to integrate Image viewer jquery plugin in grapesjs new custom block but jquery code doesn't recognize. How can write jquery code in...
Issue #1409
Component Drag Event
I want to know how can I get that component from which element is dragged and drop to the other component. I need to add a class if compone...
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.