Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editorExtension feature should be brought under new 3rd party scheme #10335

Open
tballmsft opened this issue Jan 9, 2025 · 0 comments
Open
Assignees

Comments

@tballmsft
Copy link
Contributor

tballmsft commented Jan 9, 2025

In pxt-microbit/targetconfig.json, see

        "approvedEditorExtensionUrls": [
            "https://microsoft.github.io/ml4f/",
            "https://microsoft.github.io/jacdac-docs/tools/makecode-editor-extension"
        ],

These "editors" are invoked via a button in the toolbox and opens a new page (inside an iframe in MakeCode), with content served by the URL. So this has the same issue that Eric addressed in the new 3rd party SHA-based extension.

For example, when you load the Jacdac extensions, you will get the "Configure" button in the Modules tray because pxt.json in microsoft/pxt-jacdac has this:

    "extension": {
        "namespace": "modules",
        "label": "Configure",
        "group": "Roles",
        "url": "https://microsoft.github.io/jacdac-docs/tools/makecode-editor-extension",
        "localUrl": "http://localhost:8000/tools/makecode-editor-extension"
    },

Image

you will see

Image

There is an iframe protocol that allows the "editor" to inject code into the project:

https://makecode.com/extensions/extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants