Skip Navigation

[Bug] text-to-image-plugin ignores background and background-color styles

I see what the code is meant to do... it removes those from the style so it's not on the element. And adds it to injectedStyles for the iframe to see. But that seems to actually do nothing.

For image generation, if you're lucky you see it for a split second before the full-page grey element is shown. So at least there it is actually added by the iframe. Maybe the page background could be made grey by default and the injected style could override, and the grey element could just not have a background. At least then it would work. (Though as we can't change the text colour, people could make an unreadable mess. On the other hand, that's allowed by allowing any styling in the first place ;P)

The gallery doesn't appear to add it at all, though.

Feature Request: CSS Injection

While we're on the topic, I had a feature request... a property to inject full-on CSS. This would make things very flexible. Even allow us to prevent gallery saving by hiding that button, etc. Allow us to cater to dark mode in whatever way we wish also. And this background removing and injecting thing could just be commented out entirely because this new property would do the job... and actually do the job, too.

2
2 comments