Code Block macro doesn't list languages for syntax highlighting in legacy editor

XMLWordPrintable

    • 8
    • Minor
    • 4

      Issue Summary

      When inserting a "Code Block" macro to an existing pages with the legacy editor no language for syntax highlighting is displayed or can be selected. The select list is blank:

       

      Steps to Reproduce

      1. Edit a page using the legacy editor.
      2. Tap the insert/"+" button on the editor toolbar and select Code Block
      3. Try to select a language under Syntax Highlighting

      Expected Results

      The available languages for Syntax Highlighting should be listed.

      Actual Results

      The Syntax Highlighting list shows up empty. On the Developer console a 404 error can be seen for the getlanguages.action call:

      Request URL: https://CUSTOMERURL.atlassian.net/wiki/spaces/~557057db37cfa0ddb04984b9e78be007bbf242/pages/edit/null/plugins/newcode/getlanguages.actionRequest 
      Method: GET
      Status Code: 404 

      Workaround

      A workaround is to use wiki markup to create a code block. Typing the following and to create a Code Block using the selected language:

      {code:language=html/xml}

      (If copying and pasting this string you will have to delete and re-type the final curly brace for the Code block to render)

       

      For reference, below is a list of the available languages:

      actionscript3
      applescript
      bash
      c#
      c
      css
      coldfusion
      delphi
      diff
      erl
      groovy
      html/xml
      java
      javafx
      javascript
      php
      perl
      text
      powershell
      python
      ruby
      sql
      sass
      scala
      vb

        1. screenshot.png
          16 kB
          Marlon Aguiar

            Assignee:
            Alex K
            Reporter:
            Marlon Aguiar
            Votes:
            10 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: