Advertisement
Guest User

Idekloljustshutup

a guest
Feb 22nd, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.67 KB | None | 0 0
  1. <!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head>
  2. <style type="text/css">
  3. html,
  4. body {
  5. width: 100%;
  6. height: 100%;
  7. margin: 0;
  8. padding: 0;
  9. overflow: hidden;
  10. }
  11. </style>
  12. <meta charset="utf-8">
  13. <title></title>
  14. <script async="async" type="text/javascript" src="vs/editor/editor.main.js"></script><link rel="stylesheet" type="text/css" data-name="vs/editor/editor.main" href="vs/editor/editor.main.css"><script async="async" type="text/javascript" src="vs/editor/editor.main.nls.js"></script><style type="text/css" media="screen" class="monaco-colors">.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: #1e1e1e; }
  15. .monaco-editor, .monaco-editor .inputarea.ime-input { color: #d4d4d4; }
  16. .monaco-editor .margin { background-color: #1e1e1e; }
  17. .monaco-editor .rangeHighlight { background-color: rgba(255, 255, 255, 0.04); }
  18. .vs-whitespace { color: rgba(227, 228, 226, 0.16) !important; }
  19. .monaco-editor.vs .valueSetReplacement { outline: solid 2px #888888; }
  20. .monaco-editor .focused .selectionHighlight { background-color: rgba(173, 214, 255, 0.15); }
  21. .monaco-editor .selectionHighlight { background-color: rgba(173, 214, 255, 0.07); }
  22. .monaco-editor .wordHighlight { background-color: rgba(87, 87, 87, 0.72); }
  23. .monaco-editor .wordHighlightStrong { background-color: rgba(0, 73, 114, 0.72); }
  24. .monaco-editor .findOptionsWidget { background-color: #2d2d30; }
  25. .monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px #000000; }
  26. .monaco-editor .view-overlays .current-line { border: 2px solid #282828; }
  27. .monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid #282828; }
  28. .monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 #404040 inset; }
  29. .monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 #707070 inset; }
  30. .monaco-editor .line-numbers { color: #5a5a5a; }
  31. .monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: rgba(121, 121, 121, 0.2); }
  32. .monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: rgba(100, 100, 100, 0.35); }
  33. .monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: rgba(191, 191, 191, 0.2); }
  34. .monaco-editor .minimap-shadow-visible { box-shadow: #000000 -6px 0 6px -6px inset; }
  35. .monaco-editor .view-ruler { box-shadow: 1px 0 0 0 #5a5a5a inset; }
  36. .monaco-editor .scroll-decoration { box-shadow: #000000 0 6px 6px -6px inset; }
  37. .monaco-editor .focused .selected-text { background-color: #264f78; }
  38. .monaco-editor .selected-text { background-color: #3a3d41; }
  39. .monaco-editor .cursor { background-color: #aeafad; border-color: #aeafad; color: #515052; }
  40. .monaco-diff-editor .diff-review-line-number { color: #5a5a5a; }
  41. .monaco-diff-editor .diff-review-shadow { box-shadow: #000000 0 -6px 6px -6px inset; }
  42. .monaco-editor .squiggly-error { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23ea4646'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x bottom left; }
  43. .monaco-editor .squiggly-warning { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%234d9e4d'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x bottom left; }
  44. .monaco-editor .squiggly-info { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23008000'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x bottom left; }
  45. .monaco-editor .squiggly-hint { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%223%22%20width%3D%2212%22%3E%3Cg%20fill%3D%22rgba(238%2C%20238%2C%20238%2C%200.7)%22%3E%3Ccircle%20cx%3D%221%22%20cy%3D%221%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%225%22%20cy%3D%221%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%229%22%20cy%3D%221%22%20r%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") no-repeat bottom left; }
  46. .monaco-editor .line-insert, .monaco-editor .char-insert { background-color: rgba(155, 185, 85, 0.2); }
  47. .monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: rgba(155, 185, 85, 0.2); }
  48. .monaco-editor .inline-added-margin-view-zone { background-color: rgba(155, 185, 85, 0.2); }
  49. .monaco-editor .line-delete, .monaco-editor .char-delete { background-color: rgba(255, 0, 0, 0.2); }
  50. .monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: rgba(255, 0, 0, 0.2); }
  51. .monaco-editor .inline-deleted-margin-view-zone { background-color: rgba(255, 0, 0, 0.2); }
  52. .monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px #000000; }
  53. .monaco-editor .bracket-match { background-color: rgba(0, 100, 0, 0.1); }
  54. .monaco-editor .bracket-match { border: 1px solid #888888; }
  55. .monaco-editor .codelens-decoration { color: #999999; }
  56. .monaco-editor .codelens-decoration > a:hover { color: #4e94ce !important; }
  57. .monaco-editor .findMatch { background-color: rgba(234, 92, 0, 0.33); }
  58. .monaco-editor .currentFindMatch { background-color: #515c6a; }
  59. .monaco-editor .findScope { background-color: rgba(58, 61, 65, 0.4); }
  60. .monaco-editor .find-widget { background-color: #2d2d30; }
  61. .monaco-editor .find-widget { box-shadow: 0 2px 8px #000000; }
  62. .monaco-editor .find-widget.no-results .matchesCount { color: #f48771; }
  63. .monaco-editor .find-widget .monaco-sash { background-color: #454545; width: 3px !important; margin-left: -4px;}
  64. .monaco-editor .hoverHighlight { background-color: rgba(38, 79, 120, 0.25); }
  65. .monaco-editor .monaco-editor-hover { background-color: #2d2d30; }
  66. .monaco-editor .monaco-editor-hover { border: 1px solid #454545; }
  67. .monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid rgba(69, 69, 69, 0.5); }
  68. .monaco-editor .monaco-editor-hover a { color: #4080d0; }
  69. .monaco-editor .monaco-editor-hover code { background-color: rgba(10, 10, 10, 0.4); }
  70. .monaco-editor .detected-link-active { color: #4e94ce !important; }
  71. .monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: #007acc; }
  72. .monaco-editor .monaco-editor-overlaymessage .message { border: 1px solid #007acc; }
  73. .monaco-editor .monaco-editor-overlaymessage .message { background-color: #063b49; }
  74. .monaco-editor .parameter-hints-widget { border: 1px solid #454545; }
  75. .monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid rgba(69, 69, 69, 0.5); }
  76. .monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid rgba(69, 69, 69, 0.5); }
  77. .monaco-editor .parameter-hints-widget { background-color: #2d2d30; }
  78. .monaco-editor .parameter-hints-widget a { color: #4080d0; }
  79. .monaco-editor .parameter-hints-widget code { background-color: rgba(10, 10, 10, 0.4); }
  80. .monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: #0097fb; }
  81. .monaco-editor .suggest-widget { color: #d4d4d4; }
  82. .monaco-editor .suggest-widget a { color: #4080d0; }
  83. .monaco-editor .suggest-widget code { background-color: rgba(10, 10, 10, 0.4); }
  84. .monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: rgba(234, 92, 0, 0.3); }
  85. .monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: rgba(255, 143, 0, 0.6); }
  86. .monaco-editor .reference-zone-widget .ref-tree { background-color: #252526; }
  87. .monaco-editor .reference-zone-widget .ref-tree { color: #bbbbbb; }
  88. .monaco-editor .reference-zone-widget .ref-tree .reference-file { color: #ffffff; }
  89. .monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: rgba(51, 153, 255, 0.2); }
  90. .monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: #ffffff !important; }
  91. .monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input { background-color: #001f33;}
  92. .monaco-editor .reference-zone-widget .preview .monaco-editor .margin { background-color: #001f33;}
  93. .monaco-editor .goto-definition-link { color: #4e94ce !important; }
  94. .monaco-editor .accessibilityHelpWidget { background-color: #2d2d30; }
  95. .monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px #000000; }
  96. .monaco-editor .tokens-inspect-widget { border: 1px solid #454545; }
  97. .monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: #454545; }
  98. .monaco-editor .tokens-inspect-widget { background-color: #2d2d30; }
  99.  
  100. .mtk1 { color: #d4d4d4; }
  101. .mtk2 { color: #1e1e1e; }
  102. .mtk3 { color: #cc6666; }
  103. .mtk4 { color: #9cdcfe; }
  104. .mtk5 { color: #ce9178; }
  105. .mtk6 { color: #b5cea8; }
  106. .mtk7 { color: #608b4e; }
  107. .mtk8 { color: #666666; }
  108. .mtk9 { color: #569cd6; }
  109. .mtk10 { color: #dcdcdc; }
  110. .mtk11 { color: #808080; }
  111. .mtk12 { color: #ffffff; }
  112. .mtk13 { color: #f44747; }
  113. .mtk14 { color: #ff6a00; }
  114. .mtk15 { color: #c586c0; }
  115. .mtk16 { color: #a79873; }
  116. .mtk17 { color: #dd6a6f; }
  117. .mtk18 { color: #ffc600; }
  118. .mtk19 { color: #5bb498; }
  119. .mtk20 { color: #909090; }
  120. .mtk21 { color: #778899; }
  121. .mtk22 { color: #ff00ff; }
  122. .mtk23 { color: #b46695; }
  123. .mtk24 { color: #ff8c3a; }
  124. .mtk25 { color: #ff0000; }
  125. .mtk26 { color: #4f76ac; }
  126. .mtk27 { color: #3dc9b0; }
  127. .mtk28 { color: #74b0df; }
  128. .mtk29 { color: #4864aa; }
  129. .mtki { font-style: italic; }
  130. .mtkb { font-weight: bold; }
  131. .mtku { text-decoration: underline; }</style><style type="text/css" media="screen"></style><script async="async" type="text/javascript" src="vs/basic-languages/lua/lua.js"></script></head>
  132. <body>
  133. <div id="container" style="width:100%;height:100%;" data-keybinding-context="1" data-mode-id="lua"><div class="monaco-editor vs-dark" data-uri="inmemory://model/1" style="width: 580px; height: 261px;"><div data-mprt="3" class="overflow-guard" style="width: 580px; height: 261px;"><div class="margin" role="presentation" aria-hidden="true" style="position: absolute; will-change: transform; top: 0px; height: 299px; width: 64px;"><div class="glyph-margin" style="left: 0px; width: 0px; height: 299px;"></div><div class="margin-view-zones" role="presentation" aria-hidden="true" style="position: absolute;"></div><div class="margin-view-overlays" role="presentation" aria-hidden="true" style="position: absolute; width: 64px; font-family: Consolas, &quot;Courier New&quot;, monospace; font-weight: normal; font-size: 14px; line-height: 19px; letter-spacing: 0px; height: 299px;"><div style="position:absolute;top:0px;width:100%;height:19px;"><div class="current-line" style="width:64px; height:19px;"></div><div class="line-numbers" style="left:0px;width:38px;">1</div></div><div style="position:absolute;top:19px;width:100%;height:19px;"><div class="line-numbers" style="left:0px;width:38px;">2</div></div><div style="position:absolute;top:38px;width:100%;height:19px;"><div class="line-numbers" style="left:0px;width:38px;">3</div></div></div></div><div class="monaco-scrollable-element editor-scrollable vs-dark" role="presentation" data-mprt="5" style="position: absolute; overflow: hidden; left: 64px; width: 516px; height: 261px;"><div class="lines-content monaco-editor-background" style="position: absolute; overflow: hidden; width: 1e+06px; height: 1e+06px; will-change: transform; top: 0px; left: 0px;"><div class="view-overlays" role="presentation" aria-hidden="true" style="position: absolute; height: 0px; width: 516px;"><div style="position:absolute;top:0px;width:100%;height:19px;"><div class="current-line" style="width:516px; height:19px;"></div></div><div style="position:absolute;top:19px;width:100%;height:19px;"><div class="cigr" style="left:0px;height:19px;width:30.796875px"></div></div><div style="position:absolute;top:38px;width:100%;height:19px;"></div></div><div role="presentation" aria-hidden="true" class="view-rulers"></div><div class="view-zones" role="presentation" aria-hidden="true" style="position: absolute;"></div><div class="view-lines" role="presentation" aria-hidden="true" data-mprt="7" style="position: absolute; font-family: Consolas, &quot;Courier New&quot;, monospace; font-weight: normal; font-size: 14px; line-height: 19px; letter-spacing: 0px; width: 516px; height: 299px;"><div style="top:0px;height:19px;" class="view-line"><span><span class="mtk8">--[[</span></span></div><div style="top:19px;height:19px;" class="view-line"><span><span class="mtk8">&nbsp;&nbsp;&nbsp;&nbsp;Lua&nbsp;Script</span></span></div><div style="top:38px;height:19px;" class="view-line"><span><span class="mtk8">--]]</span></span></div></div><div data-mprt="1" class="contentWidgets" style="position: absolute; top: 0px;"><div class="lightbulb-glyph" title="Show Fixes (Ctrl+.)" widgetid="LightBulbWidget" style="position: absolute; visibility: hidden; max-width: 516px;"></div></div><div role="presentation" aria-hidden="true" class="cursors-layer cursor-line-style cursor-solid"><div class="cursor " style="height: 19px; top: 0px; left: 0px; font-family: Consolas, &quot;Courier New&quot;, monospace; font-weight: normal; font-size: 14px; line-height: 19px; letter-spacing: 0px; display: block; visibility: hidden; width: 2px;"></div></div></div><div role="presentation" aria-hidden="true" class="invisible scrollbar horizontal" style="position: absolute; width: 502px; height: 10px; left: 0px; bottom: 0px;"><div class="slider" style="position: absolute; top: 0px; left: 0px; height: 10px; will-change: transform; width: 502px;"></div></div><canvas class="decorationsOverviewRuler" aria-hidden="true" width="14" height="239" style="position: absolute; will-change: transform; top: 11px; right: 0px; width: 14px; height: 239px;"></canvas><div role="presentation" aria-hidden="true" class="invisible scrollbar vertical" style="position: absolute; width: 14px; height: 261px; right: 0px; top: 0px;"><div class="arrow-background" style="position: absolute; width: 14px; height: 11px; top: 0px; left: 0px;"></div><div class="up-arrow" style="position: absolute; width: 11px; height: 11px; top: 0px; left: 1.5px;"></div><div class="arrow-background" style="position: absolute; width: 14px; height: 11px; left: 0px; bottom: 0px;"></div><div class="down-arrow" style="position: absolute; width: 11px; height: 11px; left: 1.5px; bottom: 0px;"></div><div class="slider" style="position: absolute; top: 11px; left: 0px; width: 14px; will-change: transform; height: 208px;"></div></div></div><div role="presentation" aria-hidden="true" style="width: 580px;"></div><textarea data-mprt="6" class="inputarea" wrap="off" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false" aria-label="Editor content;Press Alt+F1 for Accessibility Options." role="textbox" aria-multiline="true" aria-haspopup="false" aria-autocomplete="both" style="font-size: 1px; line-height: 19px; top: 0px; left: 64px; width: 1px; height: 1px;"></textarea><div style="position: absolute; top: 0px; left: 0px; width: 0px; height: 0px;"></div><div data-mprt="4" class="overlayWidgets" style="width: 580px;"><div class="accessibilityHelpWidget" role="dialog" aria-hidden="true" widgetid="editor.contrib.accessibilityHelpWidget" style="display: none; position: absolute;"><div role="document"></div></div></div><div data-mprt="8" class="minimap slider-mouseover" role="presentation" aria-hidden="true" style="position: absolute; left: 0px; width: 0px; height: 261px;"><div class="minimap-shadow-hidden" style="height: 261px;"></div><canvas width="1" height="261" style="position: absolute; left: 0px; width: 1px; height: 261px;"></canvas><div class="minimap-slider" style="position: absolute; will-change: transform; width: 0px;"><div class="minimap-slider-horizontal" style="position: absolute; width: 0px; height: 0px;"></div></div></div></div><div data-mprt="2" class="overflowingContentWidgets"><div class="monaco-editor rename-box" widgetid="__renameInputWidget" style="height: 19px; box-shadow: rgb(0, 0, 0) 0px 2px 8px; position: absolute; visibility: hidden; max-width: 580px;"><input class="rename-input" type="text" aria-label="Rename input. Type new name and press Enter to commit." style="font-family: Consolas, &quot;Courier New&quot;, monospace; font-weight: normal; font-size: 14px; background-color: rgb(60, 60, 60); color: rgb(204, 204, 204); border-width: 0px; border-style: none;"></div></div><div class="context-view monaco-builder-hidden" aria-hidden="true"></div></div></div>
  134. <script src="vs/loader.js"></script>
  135. <script type="text/javascript">
  136. require.config({ paths: { 'vs': 'vs' } });
  137. // API
  138. var GetText;
  139. var SetText;
  140. var SetTheme;
  141. var SetScroll;
  142. var ShowErr;
  143. var Refresh;
  144.  
  145. // Enablers
  146. var SwitchMinimap;
  147. var SwitchReadonly;
  148. var SwitchRenderWhitespace;
  149. var SwitchLinks;
  150. var SwitchLineHeight;
  151. var SwitchFontSize;
  152. var SwitchFolding;
  153. var SwitchAutoIndent;
  154. var SwitchFontFamily;
  155. var SwitchFontLigatures;
  156. var AddIntellisense;
  157.  
  158. // Variables
  159. var editor;
  160. var Proposals = [];
  161.  
  162. require(['vs/editor/editor.main'], function () {
  163. function getDependencyProposals() {
  164. return Proposals;
  165. }
  166.  
  167. monaco.languages.registerCompletionItemProvider('lua', {
  168. provideCompletionItems: function(model, position) {
  169. return getDependencyProposals();
  170. }
  171. });
  172.  
  173. monaco.editor.defineTheme('net-theme-light', {
  174. base: 'vs',
  175. inherit: true,
  176. rules: [
  177. { token: 'global', foreground: '000000' },
  178. { token: 'keyword', foreground: 'ff6a00' },
  179. { token: 'comment', foreground: '666666' },
  180. { token: 'number', foreground: 'ffc600' },
  181. { token: 'string', foreground: 'ff8c3a' },
  182. ]
  183. });
  184.  
  185. monaco.editor.defineTheme('net-theme-dark', {
  186. base: 'vs-dark',
  187. inherit: true,
  188. rules: [
  189. { token: 'global', foreground: 'FFFFFF', fontStyle: "bold" },
  190. { token: 'keyword', foreground: 'ff6a00', fontStyle: "bold" },
  191. { token: 'comment', foreground: '666666' },
  192. { token: 'number', foreground: 'ffc600' },
  193. { token: 'string', foreground: 'ff8c3a' },
  194. ]
  195. });
  196.  
  197. editor = monaco.editor.create(document.getElementById('container'), {
  198. value: [
  199. "--[[",
  200. " Lua Script",
  201. "--]]",
  202. ].join('\n'),
  203. language: 'lua',
  204. theme: "net-theme-light",
  205. folding: true,
  206. scrollbar: {
  207. verticalHasArrows: true,
  208. },
  209. dragAndDrop: true,
  210. links: false,
  211. minimap: {
  212. enabled: false,
  213. },
  214. showFoldingControls: "always",
  215. smoothScrolling: true,
  216. });
  217.  
  218. window.onresize = function() {
  219. editor.layout();
  220. };
  221.  
  222. GetText = function() {
  223. return editor.getValue();
  224. }
  225.  
  226. SetText = function(x) {
  227. editor.setValue(x);
  228. }
  229.  
  230. SetTheme = function(themeName) {
  231. if (themeName == "Dark") {
  232. monaco.editor.setTheme("net-theme-dark");
  233. }
  234. if (themeName == "Light") {
  235. monaco.editor.setTheme("net-theme-light");
  236. }
  237. }
  238.  
  239. SwitchMinimap = function(flag) {
  240. editor.updateOptions({
  241. minimap: {
  242. enabled: flag,
  243. }
  244. });
  245. }
  246.  
  247. SwitchReadonly = function(flag) {
  248. editor.updateOptions({
  249. readOnly: flag,
  250. });
  251. }
  252.  
  253. SwitchRenderWhitespace = function(op) {
  254. editor.updateOptions({
  255. renderWhitespace: op,
  256. });
  257. }
  258.  
  259. SwitchLinks = function(flag) {
  260. editor.updateOptions({
  261. links: flag,
  262. });
  263. }
  264.  
  265. SwitchLineHeight = function(num) {
  266. editor.updateOptions({
  267. lineHeight: num,
  268. });
  269. }
  270.  
  271. SwitchFontSize = function(num) {
  272. editor.updateOptions({
  273. fontSize: num,
  274. });
  275. }
  276.  
  277. SwitchFolding = function(flag) {
  278. editor.updateOptions({
  279. folding: flag,
  280. });
  281. }
  282.  
  283. SwitchAutoIndent = function(flag) {
  284. editor.updateOptions({
  285. autoIndent: flag,
  286. });
  287. }
  288.  
  289. SwitchFontFamily = function(name) {
  290. editor.updateOptions({
  291. fontFamily: name,
  292. });
  293. }
  294.  
  295. SwitchFontLigatures = function(flag) {
  296. editor.updateOptions({
  297. fontLigatures: flag,
  298. });
  299. }
  300.  
  301.  
  302. ShowErr = function(line, column, endline, endcolumn, errMessage) {
  303. editor.revealPositionInCenter({ lineNumber: line, column: column});
  304. editor.deltaDecorations([], [
  305. {
  306. range: new monaco.Range(line, column, endline, endcolumn),
  307. options: {
  308. inlineClassName: 'squiggly-error',
  309. hoverMessage: {
  310. value: errMessage,
  311. }
  312. },
  313. },
  314. ]);
  315. }
  316.  
  317. AddIntellisense = function(l, k, d, i) {
  318. var t;
  319. switch(k)
  320. {
  321. case "Class":
  322. t = monaco.languages.CompletionItemKind.Class;
  323. break;
  324. case "Color":
  325. t = monaco.languages.CompletionItemKind.Color;
  326. break;
  327. case "Constructor":
  328. t = monaco.languages.CompletionItemKind.Constructor;
  329. break;
  330. case "Enum":
  331. t = monaco.languages.CompletionItemKind.Enum;
  332. break;
  333. case "Field":
  334. t = monaco.languages.CompletionItemKind.Field;
  335. break;
  336. case "File":
  337. t = monaco.languages.CompletionItemKind.File;
  338. break;
  339. case "Folder":
  340. t = monaco.languages.CompletionItemKind.Folder;
  341. break;
  342. case "Function":
  343. t = monaco.languages.CompletionItemKind.Function;
  344. break;
  345. case "Interface":
  346. t = monaco.languages.CompletionItemKind.Interface;
  347. break;
  348. case "Keyword":
  349. t = monaco.languages.CompletionItemKind.Keyword;
  350. break;
  351. case "Method":
  352. t = monaco.languages.CompletionItemKind.Method;
  353. break;
  354. case "Module":
  355. t = monaco.languages.CompletionItemKind.Module;
  356. break;
  357. case "Property":
  358. t = monaco.languages.CompletionItemKind.Property;
  359. break;
  360. case "Reference":
  361. t = monaco.languages.CompletionItemKind.Reference;
  362. break;
  363. case "Snippet":
  364. t = monaco.languages.CompletionItemKind.Snippet;
  365. break;
  366. case "Text":
  367. t = monaco.languages.CompletionItemKind.Text;
  368. break;
  369. case "Unit":
  370. t = monaco.languages.CompletionItemKind.Unit;
  371. break;
  372. case "Value":
  373. t = monaco.languages.CompletionItemKind.Value;
  374. break;
  375. case "Variable":
  376. t = monaco.languages.CompletionItemKind.Variable;
  377. break;
  378. }
  379.  
  380. Proposals.push({
  381. label: l,
  382. kind: t,
  383. detail: d,
  384. insertText: i
  385. });
  386. }
  387.  
  388. SetScroll = function(line) {
  389. editor.revealLineInCenter({ lineNumber: line});
  390. }
  391.  
  392. Refresh = function() {
  393. var text = getText();
  394. setText("");
  395. editor.trigger('keyboard', 'type', {text: text});
  396. }
  397. });
  398. </script>
  399.  
  400. <div class="monaco-aria-container"><div class="monaco-alert" role="alert" aria-atomic="true"></div><div class="monaco-status" role="status" aria-atomic="true"></div></div></body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement