iteria-poc / blockly-html

blockly can modify the HTML (or an similar model). We could modify JSX input parameters of a component with it's body.
https://blockly-html.onrender.com/
0 stars 1 forks source link

day 1 #2

Closed imsamtar closed 3 years ago

imsamtar commented 3 years ago

Progress so far

@jozef-slezak Please review this

jozef-slezak commented 3 years ago

I am merging this as an initial commit. @imsamtar, I can not easily find the "XML to JSON format" conversion. Please give me more info about this (which file / function ...). At the moment I see there too too much XML :-)

imsamtar commented 3 years ago

Please look into this file src/helpers/toolbox.ts which is converted from blockly-html/master/demo.html#L76 from.

And this is how It is being used src/components/Blockly.svelte#L14

The only file which has XML is public/example.xml

The reason It is xml and not json is this function only supports XML blocks

Blockly.Xml.textToDom(xml_code)

...and it seems like there is no equivalent function for json in blockly lib.

https://groups.google.com/g/blockly/c/tI-jqq7DDbY/m/UzUYjP94AQAJ

jozef-slezak commented 3 years ago

Yes, please try to get rid of the XML if possible. Maybe creating a javascript objects could do that.

On Mon, Apr 12, 2021 at 12:28 PM SAMEER TARIQ @.***> wrote:

Please look into this file src/helpers/toolbox.ts https://github.com/iteria-poc/blockly-html/blob/main/src/helpers/toolbox.ts which is converted from blockly-html/master/demo.html#L76 https://github.com/bwinf/blockly-html/blob/master/demo.html#L76 from.

And this is how It is being used src/components/Blockly.svelte#L14 https://github.com/iteria-poc/blockly-html/blob/main/src/components/Blockly.svelte#L14

The only file which has XML is public/example.xml https://github.com/iteria-poc/blockly-html/blob/main/public/example.xml

The reason It is xml and not json is this function only supports XML blocks

Blockly.Xml.textToDom(xml_code)

...and it seems like there is no equivalent function for json in blockly lib.

https://groups.google.com/g/blockly/c/tI-jqq7DDbY/m/UzUYjP94AQAJ

  • May be I need to converted src/helpers/toolbox.ts to json I will do that

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/iteria-poc/blockly-html/pull/2#issuecomment-817693284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEAQKR5T7JWSIDMNLNM5TCDTILDNHANCNFSM42Y2P5CA .