githubramakrishnan / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

How to highlight JSON result? #208

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Thanks for your library, it is very useful. I implemented it in my Firefox 
addon. But I found out I cannot highlight json result correctly. Do you know 
how can I highlight JSON string? It seems use lang-js class doesn't work with 
JSON. 

Original issue reported on code.google.com by c...@zhou.fr on 24 Apr 2012 at 8:24

GoogleCodeExporter commented 9 years ago
In what way does lang-js not work with JSON?

Original comment by mikesamuel@gmail.com on 5 Feb 2013 at 1:01

GoogleCodeExporter commented 9 years ago
Hello ! for example with this code:

    $scope.datatableConfig = {
            columns : [{    header:"Code Container", //the title
                            property:"code", //the property to bind
                            id:'test', //the column id
                            edit:false, //can be edited or not
                            hide:true, //can be hidden or not
                            order:true, //can be ordered or not
                            type:"String", //the column type
                            choiceInList:false, //when the column is in edit mode, the edition is a list of choices or not
                            //extraHeaders:{"0":"Inputs"}, //the extraHeaders list
                        },
                        {   header:"test 1", //the title
                            property:"test", //the property to bind
                            id:'test2', //the column id
                            edit:false, //can be edited or not
                            hide:true, //can be hidden or not
                            order:true, //can be ordered or not
                            type:"String", //the column type
                            choiceInList:false, //when the column is in edit mode, the edition is a list of choices or not
                            //extraHeaders:{"0":"Inputs"}, //the extraHeaders list
                        }],
            compact:false,
            pagination:{
                active:true
            },      
            search:{
                url:""
                active:false
            },
            order:{
                mode:'local', //or 
                active:true,
                by:'ContainerInputCode'
            },
            remove:{
                active:false,
            },
            save:{
                active:true,
                mode:'local',
            },
            hide:{
                active:true
            },
            edit:{
                active:true
            },
            messages:{
                active:true
            },
            extraHeaders:{
                number:0,
                dynamic:true,
            },
            name:"datatable"
    };

I've got the image in the attachement.

Original comment by Deshayes...@gmail.com on 30 Sep 2013 at 10:29

Attachments: