Discuss Scratch
- Discussion Forums
- » Open Source Projects
- » Implenting Scratch editor in a website
- dev_chi
-
11 posts
Implenting Scratch editor in a website
Hi guys,
Just wondering if it's possible to implement the Scratch editor into a website, and let the website interact with it? (e.g. when a button is clicked on the website, it will insert a block into the Scratch editor)
Basically, I just want the website to interact with the Scratch editor, either by modifying what's happening in the editor, and showing that I can put stuff into the editor, and get stuff out of it through the website.
Main problem: If I embed the Scratch website into a website, then it's only a sandbox, and you can' really interact with it at all.
Cheers!
Just wondering if it's possible to implement the Scratch editor into a website, and let the website interact with it? (e.g. when a button is clicked on the website, it will insert a block into the Scratch editor)
Basically, I just want the website to interact with the Scratch editor, either by modifying what's happening in the editor, and showing that I can put stuff into the editor, and get stuff out of it through the website.
Main problem: If I embed the Scratch website into a website, then it's only a sandbox, and you can' really interact with it at all.
Cheers!
- CST1229
-
1000+ posts
Implenting Scratch editor in a website
I think you'll need to host the editor in your own website at least instead of using Scratch's in an embed.
- dev_chi
-
11 posts
Implenting Scratch editor in a website
Hi CST1229,
Could you please point me to the right direction on how I would go about doing this?
I would greatly appreaciate it!!
Thanks!
Could you please point me to the right direction on how I would go about doing this?
I would greatly appreaciate it!!
Thanks!
- dev_chi
-
11 posts
Implenting Scratch editor in a website
The website I am implementing the Scratch editor with is called: https://csunplugged.org/
This website contains a feature called, “Plugging It In” (https://csunplugged.org/en/plugging-it-in/) which basically contains a list of programming challenges for kids to do in Python & Scratch languages.
If you go to one of the Python programming challenges:
(https://csunplugged.org/en/plugging-it-in/binary-numbers/how-binary-digits-work/binary-numbers-no-calculations/)
you will see a text editor where you can type Python code to solve the programming challenges.
But for Scratch programming challenges:
(https://csunplugged.org/en/topics/binary-numbers/programming/binary-numbers-no-calculations/)
there is no editor currently implemented.
Therefore, what I'm trying to do is similar to the Python programming challenge page, but do it for Scratch. So implement parts of the Scratch editor into this website. So that users don't have to open the Scratch application on another window, to complete the Scratch programming challenges, as it will already be within this website!
This website contains a feature called, “Plugging It In” (https://csunplugged.org/en/plugging-it-in/) which basically contains a list of programming challenges for kids to do in Python & Scratch languages.
If you go to one of the Python programming challenges:
(https://csunplugged.org/en/plugging-it-in/binary-numbers/how-binary-digits-work/binary-numbers-no-calculations/)
you will see a text editor where you can type Python code to solve the programming challenges.
But for Scratch programming challenges:
(https://csunplugged.org/en/topics/binary-numbers/programming/binary-numbers-no-calculations/)
there is no editor currently implemented.
Therefore, what I'm trying to do is similar to the Python programming challenge page, but do it for Scratch. So implement parts of the Scratch editor into this website. So that users don't have to open the Scratch application on another window, to complete the Scratch programming challenges, as it will already be within this website!
Last edited by dev_chi (April 6, 2021 08:26:40)
- CST1229
-
1000+ posts
Implenting Scratch editor in a website
I can't really help with anything else, as I don't really understand the Scratch source code at all. Hi CST1229,
Could you please point me to the right direction on how I would go about doing this?
I would greatly appreaciate it!!
Thanks!
- Barthdry
-
500+ posts
Implenting Scratch editor in a website
You can read the notes below and install Node.js and Git.
You need to fork the 3 main repositories scratch-gui, scratch-vm and scratch-blocks and go to here https://github.com/llk
You need to fork the 3 main repositories scratch-gui, scratch-vm and scratch-blocks and go to here https://github.com/llk
- han614698
-
1000+ posts
Implenting Scratch editor in a website
I'm not sure–I thought you could ctrl + u and then copy it into embed and/or put in www3schools online HTML parser, but neither does anything.
- Unithlees3
-
1000+ posts
Implenting Scratch editor in a website
As @Barthdry said, copy the JavaScript from GitHub, or just compile the JavaScript into .py
- Barthdry
-
500+ posts
Implenting Scratch editor in a website
You can choose custom website after you follow the steps and then change the url of accessing it in github maybe with DNS Verifications. Also this isn't about javascript to python. Scratch desktop editor is an electron app i think so or maybe any other compilation.
- Discussion Forums
- » Open Source Projects
-
» Implenting Scratch editor in a website