-
Notifications
You must be signed in to change notification settings - Fork 19
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
Support LiveCodes #28
Comments
If you're using Monaco already, does the extension work if you just add your domain to the allowlist setting? |
No, it doesn't |
As mentioned in #9, the main Monaco compatibility issues are usually:
Do those apply to you? |
I'm using a relatively new Monaco editor version (v0.40.0) and I'm not using webpack. However, the page which hosts the editors is in an iframe whose content is dynamically written using So may be that's why the domian list does not work. |
You could try adding a <meta name="codeium:type" content="monaco"> and add detection support for this where we check the allowlist: Line 230 in acf76b2
|
Do you mean open a PR with something like this? if (host.test(window.location.href) || document.querySelector('meta[name="codeium:type"]')) {
... |
Yes, if you can verify that a solution like that works for your setup, then we could accept such a change. |
Thank you. |
Yes, the meta tag approach worked without having to add the domain to the allowlist. Thank you. However, I did need to change the way I loaded the page probably due to CSP. See details here: live-codes/livecodes#409 My app is open-source, and it allows self-hosting. So, the meta tag approach suits me a lot more. I will open a PR with this change. I just have one question.
What happens if we need to support more than one editor (e.g. Monaco and CodeMirror)? |
I'm picturing the content value is a comma-separated list of opt-in injections we're requesting basically. |
* allow running in web pages using a meta tag if a web page needs to run the extension without being in the allowlist, this meta tag would trigger activating the functionality of the extension: ``` <meta name="codeium:type" content="monaco"> ``` see #28 * add TODO comment for injection types
Thank you. Please let us know when the new release is published so that LiveCodes users can use it. Thank you, indeed. |
This should be published now. |
This is a very nice project. Thank you.
And Codeium is, of course, very useful indeed.
I'm the author of LiveCodes, a feature-rich, open-source, client-side code playground that supports 80+ languages/frameworks. Please read the announcement.
LiveCodes also allows embedding playgrounds in webpages using a powerful SDK.
I'm interested in adding support for LiveCodes to your project.
LiveCodes allows the user to select from 3 code editors:
The user may select the editor from editor settings or configuration options (if using the SDK).
I understand, that currently of these editors, you only support Monaco editor, which is fine with me. In my use-case, this will be the most commonly used editor.
The implementation of the code editors can be found here.
I would be interested to help providing the integration.
The text was updated successfully, but these errors were encountered: