Hi everyone, I'm trying to use the visual editor a...
# ask-questions
s
Hi everyone, I'm trying to use the visual editor and have added the script needed to start editing, but I keep seeing the error that I haven't added the script. https://github.com/growthbook/growthbook/issues/932 This is an issue someone else has created, however there was no answer there. I'm using v1.9 Thanks in advance
f
anything in the console?
s
Hi Graham, thanks for always answering. Actually I think I might have found the problem.
๐Ÿ‘ 1
Hi, @fresh-football-47124, I fixed the previous problem but, it still won't let me use the visual editor. Can you tell me what I'm doing wrong? Do I have to connect the javascript SDK as well?
Or must I actually send an event that can be tracked in Growthbook? because i just want to use the editor, not start an experiment(yet)
f
can you explain a bit more?
you were able to get the visual editor to create two variations?
s
sure, I'm trying to use the visual editor. I've copied the script into the HEAD section of the page, but when i open the editor, it still gives the error that i haven't added the script
f
ah
and i the console, any errors?
s
no. this is what it shows in the console
f
is what you pasted earlier still the implementation code?
s
at the moment yes. although because i deleted everything(๐Ÿ˜…) the key has changed and i haven't implemented it in the code yet. is it possible to test this in a local run of the code? because every change needs an update and our frontend code is really slow to dockerise
f
ya, you can test it local
some of the CORS things may need to be adjusted
s
really? how?
we have extensions that we use for that
but do the growthbook instance and the frontend code have to be on the same computer?
f
no
s
then what address am i supposed to set in the editor?
f
localhost? wherever youโ€™re running the page you want to test on
s
oh, i think i understand now. it doesn't have to be a domain then? it can be any where on my local network correct?
f
it could even be your live site- just has to have that code for the iframe to talk to
and load the payload of dom mutations
s
i'm sorry i don't understand that part
f
keeping in mind, that for React/Next based sites, this code will cause some flickering
(weโ€™re improving the visual editor currently)
so the visual editor, as loaded from the GrowthBook UI, loads your site inside an iframe
that iframe checks to make sure your site has the GrowthBook script running
s
it's definitely needed. we just can't use google optimise anymore
f
that can be blocked by CORS or x-origin settings
s
oh ok. i get it now
thanks. i'll start testing it on my local run of the code, so i can understand the problem better. after that, if the problem persists, i'll trouble you some more.๐Ÿ˜… thanks a lot
f
ok
๐Ÿ‘ 1
the new visual editor will use our chrome extension instead of iframes
much easier to use
s
that's lovely. when can we hope for an update?
f
that will be done in about 3 weeks
s
that's amazing. I'll be waiting๐Ÿ˜‡