How to add image in workspace

142 views
Skip to first unread message

Gauri raykar

unread,
Mar 18, 2021, 11:05:23 AM3/18/21
to blo...@googlegroups.com
Hello, 
    I want to add  image in workspace with css property's.
IMG_20210318_203402.jpg

Neil Fraser

unread,
Mar 18, 2021, 1:11:50 PM3/18/21
to blo...@googlegroups.com
From the playground:
Open the console and type:

document.getElementById('blocklyDiv').style.backgroundImage =
document.getElementsByClassName('blocklySvg')[0].style.backgroundColor = 'inherit';

That should give you what you need.

On Thu, 18 Mar 2021 at 08:05, Gauri raykar <gaurir...@gmail.com> wrote:
Hello, 
    I want to add  image in workspace with css property's.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/CAFT6%3DT0_goMXaKOzpZzUESS8Zrv_-UMYhp8NiaOO_491S8_bSw%40mail.gmail.com.


--

Gauri raykar

unread,
Mar 19, 2021, 11:41:15 PM3/19/21
to blo...@googlegroups.com
It's working. But I want only one image and it gives me multiple images in workspace.
please help me.

Neil Fraser

unread,
Mar 20, 2021, 4:05:20 AM3/20/21
to blo...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages