mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Add colorize test page (#151)
This commit is contained in:
parent
b48fd28aa5
commit
31dddee326
2 changed files with 57 additions and 0 deletions
55
test/colorize.html
Normal file
55
test/colorize.html
Normal file
|
|
@ -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>
|
||||||
|
|
@ -18,6 +18,8 @@ Jump to:
|
||||||
|
|
|
|
||||||
<a href="./mouse-scrollable-element.html">[scrollable element]</a>
|
<a href="./mouse-scrollable-element.html">[scrollable element]</a>
|
||||||
|
|
|
|
||||||
|
<a href="./colorize.html">[colorize element]</a>
|
||||||
|
|
|
||||||
<a href="./cross-origin-broken.html">[cross origin broken]</a>
|
<a href="./cross-origin-broken.html">[cross origin broken]</a>
|
||||||
|
|
|
|
||||||
<a href="./cross-origin-good.html">[cross origin good]</a>
|
<a href="./cross-origin-good.html">[cross origin good]</a>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue