Manipulate DOM in plugin preview

Hi everyone!

I’m trying to manipulate the DOM in my plugin but i can’t do it. I’ve tryied to use the other version of the bubble Plugin API and it works! But i want to use the lastest version. Here is the code (preview tab):

function(instance, properties) {
const previewContainer = document.createElement(‘div’);
previewContainer.setAttribute(‘style’, ‘background-color: black; position: absolute; top: 0; left: 0; width: 100%; height: 100%;’);
const description = document.createElement(‘p’);
description.setAttribute(‘style’,‘text-align: center; color: white;’);
description.innerHTML = ‘My plugin description’;

1 Like

Funny, that’s exactly what I’m trying to do as well

1 Like

Element preview is currently broken. If you send a bug report, hopefully it will raise priority of the fix :face_with_monocle:


lol, apparently we can’t do this by now🤷🏻‍♂️

Thanks!! Now let’s cry in the shower

I saw a different post the other day, apparently it’s been broken for years :grimacing:

1 Like