| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>Editor</title>
- <style type="text/css" media="screen">
- body {
- overflow: hidden;
- }
- #editor {
- margin: 0;
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- }
- </style>
- </head>
- <body>
- <pre id="editor"></pre>
- <script src="./source/ace/ace.js" type="text/javascript" charset="utf-8"></script>
- <script src="./source/ace/ext-language_tools.js"></script>
- <script src="./source/systemjs/system.js" type="text/javascript" charset="utf-8"></script>
- <script>
- System.config({
- "baseURL": "/",
- "defaultJSExtensions": true,
- // TODO: figure out how to make this be loaded in by the extension instead of being hard-coded in the html page
- meta: {
- './source/editorCore/modules/typescript.js': {
- format: 'global',
- exports: 'ts',
- }
- }
- });
- // Functions exposed to the host editor. These
- // are hooked in here so that they are available immediately from the host
- // and when called will bring in the interop as a promise and call it once
- // it has been loaded
- function HOST_loadCode(url) {
- System.import('./source/editorCore/interop').then((module) => {
- module.default.getInstance().loadCode(url);
- });
- }
- function HOST_saveCode() {
- System.import('./source/editorCore/interop').then((module) => {
- module.default.getInstance().saveCode();
- });
- }
- function HOST_resourceRenamed(path, newPath) {
- System.import('./source/editorCore/interop').then((module) => {
- module.default.getInstance().resourceRenamed(path, newPath);
- });
- }
- function HOST_resourceDeleted(path) {
- System.import('./source/editorCore/interop').then((module) => {
- module.default.getInstance().resourceDeleted(path);
- });
- }
- function HOST_preferencesChanged() {
- System.import('./source/editorCore/interop').then((module) => {
- module.default.getInstance().preferencesChanged();
- });
- }
- System.import('./source/editorCore/interop').then((module) => {
- module.default.getInstance().editorLoaded();
- });
- </script>
- </body>
- </html>
|