Background image issue
Question
Hi @artf one more issue when using custom manager , what do we set on background images? editor.getSelected().set('src', url) not working on background images. should i replace 'src' with 'background'?
Answers (3)
Use this
editor.getSelected()
.addStyle({'background-image': `url(${url})`});
@artf Thank you for the awesome work man! 👍
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 #771
Image src is not updating
Hi @artf, I have updated the image src using below code: editor.getSelected().set('attributes', {'src': image_Url}); but when i set all the...
Issue #932
Setting background image results in duplicate style rules
Hi @artf, I have one strange little problem. I have a custom trait which has an implementation for setting images and background images. Wh...
Issue #933
Setting backgroud image results in duplicate style rules
Hi @artf, I have one strange little problem. I have a custom trait which has an implementation for setting images and background images. Wh...
Issue #497
Asset manager
hi @artf , is it possible to replace current asset manager , from my custom one? I have created my own asset manager , i want to use that t...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.