sample.js 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. // Remember to check out the CSS too!
  2. var htmlCode =
  3. '<html><!--long linelong linelong linelong linelong linelong linelong linelong linelong linelong line-->\n<head>\n <!-- HTML comment -->\n <style type="text/css">\n /* CSS comment */\n </style>\n <script type="javascript">\n // JavaScript comment\n </' +
  4. 'script>\n</head>\n<body></body>\n</html>';
  5. monaco.editor.create(document.getElementById('container'), {
  6. value: htmlCode,
  7. language: 'text/html',
  8. theme: 'vs',
  9. scrollbar: {
  10. // Subtle shadows to the left & top. Defaults to true.
  11. useShadows: false,
  12. // Render vertical arrows. Defaults to false.
  13. verticalHasArrows: true,
  14. // Render horizontal arrows. Defaults to false.
  15. horizontalHasArrows: true,
  16. // Render vertical scrollbar.
  17. // Accepted values: 'auto', 'visible', 'hidden'.
  18. // Defaults to 'auto'
  19. vertical: 'visible',
  20. // Render horizontal scrollbar.
  21. // Accepted values: 'auto', 'visible', 'hidden'.
  22. // Defaults to 'auto'
  23. horizontal: 'visible',
  24. verticalScrollbarSize: 17,
  25. horizontalScrollbarSize: 17,
  26. arrowSize: 30
  27. }
  28. });