Before you drag and drop the image,there was nothing in assetManager
Question
and I don't know how to set the backgroundImage
Answers (3)
@ionic666 you can read Asset API documentation here There is no image in your asset manager. It seems you haven't added it yet. You can add like this..
grapesjs.init({
....
.....
assetManager: {
assets: [
{
type: 'image',
src: 'http://via.placeholder.com/250x350/0174DF/ffffff/',
date: '2018-06-28',
height: 350,
width: 250
},
{
type: 'image',
src: 'http://via.placeholder.com/250x350/5FB404/ffffff/',
date: '2018-06-28',
height: 350,
width: 250
}
]
}
....
....
})
@ronaldaug
i have done it.but I mean that if i haven't drag the image component,I cannot set background images for other components.
The official demo was also not available
Maybe, you didn't add the component type as image. Make sure you add it. And you can just double click on the image to trigger the assets images box.
Could you share your codes via codepen or jsfiddle?
Do you mean this official demo ? I can see the images under Flex is the new black section do not work. It's because the images were added via CSS codes.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #408
How to update toolbar of component?
Hi Artf, i was added new command to editable component, update style work well but i don't know how to update this toolbar after component...
Issue #1119
upload image has a misstake
when i drag a image into a block,then this image can not be setted,and when i click it,there is nothing
Issue #1990
[QUESTIONS] need to call method before remove the html component
Hi, I need to call the method before remove the HTML component. how can I do that calling method like editor.on('block:drag:stop', function...
Issue #1723
[QUESTION] replacing particular text in dropped component
Hi, I get the value from custom traits from what I entered but I don't know how to change the particular value in dropped component and ren...
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.