Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/vite/index.ts
4770 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
/// <reference path="../../src/vs/monaco.d.ts" />
7
/* eslint-disable local/code-no-standalone-editor */
8
9
export * from '../../src/vs/editor/editor.main';
10
import './style.css';
11
import * as monaco from '../../src/vs/editor/editor.main';
12
13
globalThis.monaco = monaco;
14
const root = document.getElementById('sampleContent');
15
if (root) {
16
const d = monaco.editor.createDiffEditor(root);
17
18
d.setModel({
19
modified: monaco.editor.createModel(`hello world`),
20
original: monaco.editor.createModel(`hello monaco`),
21
});
22
}
23
24