Before you drag and drop the image,there was nothing in assetManager
and I don't know how to set the backgroundImage
@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.
i am sorry.i have the component for image.
when i use the component for image,there will be ok.
but i just want to change the background-image for other element before i open the assets.
you can try to change it first when you have not drag the image
@ionic666 you can change the background-image from the style manager. And again @ionic666 you HAVE TO follow the issue template otherwise you're making us waste our time to understand what you asking
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.