Browse Source

Merge branch 'master' of https://github.com/Microsoft/monaco-editor

Martin Aeschlimann 8 years ago
parent
commit
221024b1e3
4 changed files with 65 additions and 8 deletions
  1. 6 8
      README.md
  2. 55 0
      test/colorize.html
  3. 2 0
      test/index.html
  4. 2 0
      website/index.html

+ 6 - 8
README.md

@@ -16,14 +16,7 @@ Browse the latest editor API at [`monaco.d.ts`](https://github.com/Microsoft/mon
 
 
 ## Issues
 ## Issues
 
 
-Please mention the version of the editor when creating issues and the browser you're having trouble in.
-
-This repository contains only the scripts to glue things together, please create issues against the actual repositories where the source code lives:
- * [monaco-editor-core](https://github.com/Microsoft/vscode) -- (the editor itself)
- * [monaco-typescript](https://github.com/Microsoft/monaco-typescript) -- (JavaScript or TypeScript language support)
- * [monaco-css](https://github.com/Microsoft/monaco-css) -- (CSS, LESS or SCSS advanced language support)
- * [monaco-json](https://github.com/Microsoft/monaco-json) -- (JSON advanced language support)
- * [monaco-languages](https://github.com/Microsoft/monaco-languages) -- (bat, coffee script, cpp, csharp, fsharp, go, ini, jade, lua, objective-c, powershell, python, r, ruby, sql, swift, vb or xml colorizers)
+Please mention the version of the editor when creating issues and the browser you're having trouble in. Create issues in this repository.
 
 
 ## Known issues
 ## Known issues
 In IE, the editor must be completely surrounded in the body element, otherwise the hit testing we do for mouse operations does not work. You can inspect this using F12 and clicking on the body element and confirm that visually it surrounds the editor.
 In IE, the editor must be completely surrounded in the body element, otherwise the hit testing we do for mouse operations does not work. You can inspect this using F12 and clicking on the body element and confirm that visually it surrounds the editor.
@@ -144,6 +137,11 @@ Create a Monarch tokenizer [here](https://microsoft.github.io/monaco-editor/mona
 > Q: I see the warning "Could not create web worker". What should I do?<br/>
 > Q: I see the warning "Could not create web worker". What should I do?<br/>
 > A: 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.
 > A: 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.
 
 
+
+> Q: Is the editor supported in mobile browsers or mobile web app frameworks?<br/>
+> A: No.
+
+
 ## Dev
 ## Dev
 
 
 ### Cheat Sheet
 ### Cheat Sheet

+ 55 - 0
test/colorize.html

@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+</head>
+<body>
+
+<h2>Colorize example</h2>
+
+<pre id="code" data-lang="text/css" style="width:500px;">
+/* Some example CSS */
+
+@import url("something.css");
+
+body {
+  margin: 0;
+  padding: 3em 6em;
+  font-family: tahoma, arial, sans-serif;
+  color: #000;
+}
+
+#navigation a {
+  font-weight: bold;
+  text-decoration: none !important;
+}
+
+h1 {
+  font-size: 2.5em;
+}
+
+h2 {
+  font-size: 1.7em;
+}
+
+h1:before, h2:before {
+  content: "some contents";
+}
+
+code {
+  font-family: courier, monospace;
+  font-size: 80%;
+  color: #418A8A;
+}
+</pre>
+
+<script src="../metadata.js"></script>
+<script src="dev-setup.js"></script>
+<script>
+	loadEditor(function() {
+		monaco.editor.colorizeElement(document.getElementById('code'));
+	});
+</script>
+</body>
+</html>

+ 2 - 0
test/index.html

@@ -18,6 +18,8 @@ Jump to:
 &nbsp;|&nbsp;
 &nbsp;|&nbsp;
 <a href="./mouse-scrollable-element.html">[scrollable element]</a>
 <a href="./mouse-scrollable-element.html">[scrollable element]</a>
 &nbsp;|&nbsp;
 &nbsp;|&nbsp;
+<a href="./colorize.html">[colorize element]</a>
+&nbsp;|&nbsp;
 <a href="./cross-origin-broken.html">[cross origin broken]</a>
 <a href="./cross-origin-broken.html">[cross origin broken]</a>
 &nbsp;|&nbsp;
 &nbsp;|&nbsp;
 <a href="./cross-origin-good.html">[cross origin good]</a>
 <a href="./cross-origin-good.html">[cross origin good]</a>

+ 2 - 0
website/index.html

@@ -55,6 +55,8 @@
 
 
 					<p>It is licensed under the MIT License and supports IE 9/10/11, Edge, Chrome, Firefox, Safari and Opera.</p>
 					<p>It is licensed under the MIT License and supports IE 9/10/11, Edge, Chrome, Firefox, Safari and Opera.</p>
 
 
+					<p>The Monaco editor is <span style="font-weight:bold">not</span> supported in mobile browsers or mobile web frameworks. </p>
+					
 					<p>Find more information at the <a href="https://github.com/Microsoft/monaco-editor">Monaco Editor repo</a>.</p>
 					<p>Find more information at the <a href="https://github.com/Microsoft/monaco-editor">Monaco Editor repo</a>.</p>
 				</div>
 				</div>
 			</div>
 			</div>