Closed Vegz78 closed 9 months ago
If the project is shared when the code view is opened, the preview and the editable project should open in the same view.
For example, by resharing that project in the javascript view, it generates a link where the default view is javascript: https://makecode.microbit.org/_gJof4qbXLK2C
I believe this is controlled via the preferredEditor
key in pxt.json, which changes every time you change between code and blocks:
There is a way to generate text based URL using a project which is a text based project.
@abchatra: Your answer does not really apply, since the problem at hand was to share a regular project with blocks(Blocks, JavaScript and Python) in the JavaScript or Python editor "view", not to make it a "JavaScript only" project.
However, @microbit-carlos' solution does apply, thank you for the explanation! Never thought it was that easy and already supported, hehe...
Is your feature request related to a problem? Please describe. It would be nice sometimes, even for block based projects, to be able to open shared projects directly in a text based editor(JavaScript or Python).
Describe the solution you'd like I'd like to be able to make a link that opens a shared project directly in a text based editor using a custom magic URL, maybe like this: https://makecode.microbit.org/_YTbKYAAimAxz#JavaScript
Describe alternatives you've considered I have found no alternatives.
Additional context The feature has been discussed on the forum: https://forum.makecode.com/t/editor-magic-url-flags/10743/5?u=vegz78