Comments (5)
The sample code for running cross origin is wrong. The variable for setting the cross origin worker url should be GlobalEnvironment, not MonacoEnvironment. See this commit microsoft/vscode@70072cb
from monaco-editor.
@gusdaud I am not sure what you mean. https://microsoft.github.io/monaco-editor/index.html uses the monaco-editor
npm modules as it is shipped and has a HTML example:
Are you running your sample pages on a real protocol (such as http
or https
) or are you using the file
protocol (the latter does not allow for web workers to be created).
[1] Chrome and Opera give an error "Uncaught SecurityError: Failed to construct 'Worker': Script at 'file:///Path/to/worker.js' cannot be accessed from origin 'null'." when you try to run a worker locally. It needs to be on a proper domain.
from monaco-editor.
Hey Alex. I'm running on http localhost and on google Chrome.
I've managed to make auto complete and other features provided by the workers to function by manually copying some files to my project such as:
\min\vs\languages\html\common\htmlWorker.js
\min\vs\languages\html\common\htmlWorker.nls.js
\min\vs\base\worker\workerMain.js
That didn't come when I NPM INSTALL Monaco.
(I had to debug the online samples to figure which files were missing)
from monaco-editor.
brought back in microsoft/vscode@50fabe9
from monaco-editor.
The sample code for running cross origin is wrong. The variable for setting the cross origin worker url should be GlobalEnvironment, not MonacoEnvironment. See this commit Microsoft/vscode@70072cb
Nice! Fixed here!
from monaco-editor.
Related Issues (20)
- [Bug] paste by ctrl+v not working inside editor after update to 0.46.0 HOT 1
- [Bug] Glyph margin decorations/widgets for deleted lines not rendering in the inline view
- [Bug] createScopedLocalize is undefined HOT 1
- [Bug] Crash / Slowness when JSON Schema is applied
- [Bug] Can't automatic init webworker
- [Bug] Sticky scroll toggle does not work
- [Bug] Trying to fetch loader script get 403/421 cloudflare cdn link is probably broken HOT 8
- [Bug] Inline Completions doesn't respect word wrapping when rendering (ghost text) parts of an inline suggestion as additional lines (using view line)
- [Bug] toolbar background of inline completion is broken
- [Bug] simpleWorker.nls.js fails to load if vs path does not end in 'vs'
- [Bug] Safari: non-https site reports `undefined is not an object (evaluating 'navigator.clipboard.write')`
- [Feature Request] Can we have a predicate to decide if a completion popup should be displayed?
- [Bug] editor.EditorZoom.setZoomLevel doesn't set the scale for lightBulb icon
- [Bug] loadForeignModule error after I use editor with language json
- [Bug] tip position calculate error
- [Bug] when the option readOnly is true, the marker function is not running HOT 1
- [Question] findWithArgs searchString unable to use
- `csp.contribution.ts` is missing the file extension HOT 1
- Editor text is centered instead of left HOT 1
- [Bug] Syntax highlighting issue when typing quote character
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monaco-editor.