mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Add more test pages
This commit is contained in:
parent
0ba3ca8747
commit
0abdd95fe1
7 changed files with 402 additions and 55 deletions
31
test/mouse-fixed.html
Normal file
31
test/mouse-fixed.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<!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 style="height:2000px">
|
||||
|
||||
<h2>Monaco Editor in fixed element</h2>
|
||||
|
||||
<div style="position: fixed; left: 20%; top: 20%; right: 20%; height: 400px; border:1px solid silver" id="Editor">
|
||||
|
||||
<script src="../metadata.js"></script>
|
||||
<script src="dev-setup.js"></script>
|
||||
<script>document.write('<script src="' + METADATA.CORE.path + '/loader.js"><'+'/script>');</script>
|
||||
<script>
|
||||
loadEditor(function() {
|
||||
var ed =monaco.editor.create(document.getElementById('Editor'), {
|
||||
value: document.documentElement.innerHTML.split(/\n|></).join('\n'),
|
||||
language: 'xml'
|
||||
});
|
||||
ed.deltaDecorations([], [{
|
||||
range: { startLineNumber:1, startColumn:1, endLineNumber:Number.MAX_VALUE, endColumn:Number.MAX_VALUE },
|
||||
options: {
|
||||
hoverMessage: 'come on'
|
||||
}
|
||||
}])
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue