Skip to content

Can't figure out how to load static_highlight from cdnjs #4921

Answered by nightwing
Max13 asked this question in Q&A
Discussion options

You must be logged in to vote

This works https://jsfiddle.net/eLdoa5fg/

<script src=https://cdnjs.cloudflare.com/ajax/libs/ace/1.10.1/ace.js></script>
<script src=https://cdnjs.cloudflare.com/ajax/libs/ace/1.10.1/ext-static_highlight.js></script>

<pre class="code" ace-mode="json" ace-theme="monokai" ace-gutter="true">{
  "menu": {
    "id": "file",
    "value": "File",
    "popup": {
      "menuitem": [
        {
          "value": "New",
          "onclick": "CreateNewDoc()"
        },
        {
          "value": "Open", 
          "onclick": "OpenDoc()"
        },
        {
          "value": "Close", 
          "onclick": "CloseDoc()"
        }
      ]
    }
  }
}</pre>
ace.config.set('basePath', 'https://cdnjs.c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Max13
Comment options

Answer selected by Max13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants