diff --git a/README.md b/README.md index f86268c3..d09b0a2f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ It is recommended to develop against the `dev` version, and in production to use - Learn how to integrate the editor with these [complete samples](./samples/). - [Integrate the AMD version](./monaco-editor/docs/integrate-amd.md). - - [Integrate the AMD version cross-domain](./monaco-editor/docs/integrate-amd-cross.md) - [Integrate the ESM version](./monaco-editor/docs/integrate-esm.md) - Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html). - Explore the [API docs](https://microsoft.github.io/monaco-editor/api/index.html) or read them straight from [`monaco.d.ts`](https://github.com/Microsoft/monaco-editor/blob/gh-pages/playground/monaco.d.ts.txt). @@ -70,7 +69,7 @@ It is an AMD loader that we use in VS Code. Yes. ❓ **I see the warning "Could not create web worker". What should I do?** -HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes. Please also see the cross-domain case above. +HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes. ❓ **Is the editor supported in mobile browsers or mobile web app frameworks?** diff --git a/monaco-editor/docs/integrate-amd-cross.md b/monaco-editor/docs/integrate-amd-cross.md deleted file mode 100644 index 39c74f93..00000000 --- a/monaco-editor/docs/integrate-amd-cross.md +++ /dev/null @@ -1,84 +0,0 @@ -## Integrating the AMD version of the Monaco Editor in a cross-domain setup - -Here is the most basic HTML page that embeds the editor, using AMD, in the case that the editor sources are hosted on a different domain (e.g. CDN) than the document origin. - -More self-contained samples are available at [monaco-editor-samples](https://github.com/Microsoft/monaco-editor-samples). - -If you are hosting your `.js` on a different domain (e.g. on a CDN) than the HTML, you should know that the Monaco Editor creates web workers for smart language features. Cross-domain web workers are not allowed, but here is how you can proxy their loading and get them to work: - -Assuming the HTML lives on `www.mydomain.com` and the editor is hosted on `www.mycdn.com`. - ---- - -# Option 1: Use a data: worker URI - -- `https://www.mydomain.com/index.html`: - -```html - - -``` - ---- - -# Option 2: Host on your domain a worker proxy - -- `https://www.mydomain.com/index.html`: - -```html - - -``` - -- `https://www.mydomain.com/monaco-editor-worker-loader-proxy.js`: - -```js -self.MonacoEnvironment = { - baseUrl: 'http://www.mycdn.com/monaco-editor/min/' -}; -importScripts('www.mycdn.com/monaco-editor/min/vs/base/worker/workerMain.js'); -``` - ---- - -That's it. You're good to go! :) diff --git a/test/manual/cross-origin-good.html b/test/manual/cross-origin-good.html deleted file mode 100644 index f6d9f2b0..00000000 --- a/test/manual/cross-origin-good.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -

Monaco Editor cross origin correct

- -
-
-
- - - - - - - diff --git a/test/manual/cross-origin-worker-proxy.js b/test/manual/cross-origin-worker-proxy.js deleted file mode 100644 index 2b2898e3..00000000 --- a/test/manual/cross-origin-worker-proxy.js +++ /dev/null @@ -1,10 +0,0 @@ -var baseUrl = self.location.hash; -baseUrl = baseUrl.replace(/^#/, ''); -baseUrl = baseUrl.replace(/vs$/, ''); - -console.log('WORKER BASE_URL: ' + baseUrl); - -self.MonacoEnvironment = { - baseUrl: baseUrl -}; -importScripts(baseUrl + 'vs/base/worker/workerMain.js'); diff --git a/test/manual/cross-origin-broken.html b/test/manual/cross-origin.html similarity index 100% rename from test/manual/cross-origin-broken.html rename to test/manual/cross-origin.html diff --git a/test/manual/index.html b/test/manual/index.html index 727d2328..fcc4311b 100644 --- a/test/manual/index.html +++ b/test/manual/index.html @@ -20,9 +20,7 @@  |  [colorize element]  |  - [cross origin broken] -  |  - [cross origin good] + [cross origin]  |  [diff]