Discuss Scratch

TheBaton
Scratcher
100+ posts

HTML Editor Extension

Editor Extension
WARNING: You may think that this suggestion is rejected, but the version of this idea that was rejected wasn't used because it involved converting .sb3 to JavaScript or HTML. However, this idea isn't the same, as it involves text-based programming to intertwine with normal block code only when it is run, and then it is free reign for the document. Read entirely before posting, please.

I had an idea for Scratch that would allow users to write code instead of dragging in blocks. It would allow you to create a document like so:

run document [myDoc v] :: extension

write [myDoc v] :: extension hat

Essentially, you program the document in three segments: CSS, HTML, and JS. So, you'd be able to manipulate the game's structure, and lots of suggested things can be added in. Would this defeat the purpose of custom blocks? Of course not! The documents can only reference translated sprites, by which I mean you declare that sprite in the document. Running a document would overwrite the normal screen with itself.

Concerns
There are many bad things that could come of this. However, there are fixes.
  • iframes do not load, nor are they accepted in the editor. There may be an option to create and run another Scratch document inside a similar HTML object.
  • Anchors, or links, are also not accepted. There may be an option to link to a page within the Scratch domain, but that is all.
  • Downloads are not allowed, and will be taken as a syntax error.
  • Extra windows cannot be opened for obvious reasons.
  • Tell me if there are more!

Basically, this editor would be a sublanguage of HTML, CSS, and JS. Certain things may be changed so younger kids can understand it, like syntax and structure, but it would be slight. All in all, is this necessary? No! Of course not. This is simply an idea.

Please warn me if this is a dupe! I'll be sure to take this elsewhere.

Last edited by TheBaton (Today 03:46:24)

Catscratcher07
Scratcher
1000+ posts

HTML Editor Extension

Any forum of text-based programming is rejected:

The Official List of Rejected Suggestion wrote:

2.2 Text-based syntax in Scratch
Some users wish to code Scratch not with the blocks, but with typing code instead (similar to how more advanced programming languages work). Others are interested in an option to view, convert, or download Scratch code to other programming languages. However, the Scratch Team has discussed this possibility multiple times and has decided every time that it would not be beneficial for beginners or teachers.
TOLoRS link
TheBaton
Scratcher
100+ posts

HTML Editor Extension

Catscratcher07 wrote:


I think that a mere VERSION of this could be created, just not the same as this. Maybe you could grab an extension that will give you blocks of everything you need! So, for attributes like “id” we'd have some kind of new variable type that stands in for HTML objects.

//HTML / CSS Stuff
when [Document1 v] is run :: extension hat
set object [my header v] to {
set [tag v] to (h1 v) :: extension
set [type v] to (text v) :: extension
set [font-size v] to [18] points :: extension
set [color v] to (#000000) :: extension
} :: extension // In this case, there can't really be any other type. Anything but text in this scenario would be a syntax error. The "font-size" block is actually CSS, and so is the "color".
(my header :: extension) //object reference, mainly for JS

//JS
set JavaScript [my variable v] to ([12] + ([x position v] of (my header)::extension)) :: extension
//And more!

Yeah, but I still don't think it will be added.
Scratch_NT
Scratcher
100+ posts

HTML Editor Extension

I think it sounds cool at first, however, Scratch is supposed to be friendly for coding beginners and if you now just want to include the concepts of JS, CSS, HTML, then it might cause a lot of confusion.
spectre_specs
Scratch Team
1000+ posts

HTML Editor Extension

Closing as this is a rejected suggestion.

Powered by DjangoBB