Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Konstantin Kožokar 6 posts 86 karma points
    Jan 11, 2018 @ 16:52
    Konstantin Kožokar
    0

    Good afternoon, Is there a way how to parse raw grid JSON string to HTML on backend?

  • Konstantin Kožokar 6 posts 86 karma points
    Jan 11, 2018 @ 17:44
    Konstantin Kožokar
    0

    Here is example of json string:

    {
                    "label": "bodyText",
                    "description": "Load some stuff here",
                    "view": "grid",
                    "config": {
                        "items": {
                            "styles": [
    
                            ],
                            "config": [
    
                            ],
                            "columns": 8,
                            "templates": [
                                {
                                    "name": "1 column layout",
                                    "sections": [
                                        {
                                            "grid": 8
                                        }
                                    ]
                                }
                            ],
                            "layouts": [
                                {
                                    "name": "Celá šířka",
                                    "areas": [
                                        {
                                            "grid": 8,
                                            "allowAll": false,
                                            "allowed": [
                                                "rte",
                                                "media",
                                                "macro"
                                            ]
                                        }
                                    ],
                                    "label": "Celá šířka"
                                },
                                {
                                    "name": "2 sloupce",
                                    "areas": [
                                        {
                                            "grid": 4,
                                            "allowAll": false,
                                            "allowed": [
                                                "rte",
                                                "media",
                                                "macro"
                                            ]
                                        },
                                        {
                                            "grid": 4,
                                            "allowAll": false,
                                            "allowed": [
                                                "rte",
                                                "media",
                                                "macro"
                                            ]
                                        }
                                    ],
                                    "label": "2 sloupce"
                                }
                            ]
                        },
                        "startNodeId": -1
                    },
                    "alias": "l6axgyqh38c",
                    "value": {
                        "name": "1 column layout",
                        "sections": [
                            {
                                "grid": 8,
                                "rows": [
                                    {
                                        "name": "Celá šířka",
                                        "areas": [
                                            {
                                                "grid": 8,
                                                "allowAll": false,
                                                "allowed": [
                                                    "rte",
                                                    "media",
                                                    "macro"
                                                ],
                                                "hasConfig": false,
                                                "controls": [
                                                    {
                                                        "value": "<p>Ahoj</p>",
                                                        "editor": {
                                                            "name": "Rich text editor",
                                                            "alias": "rte",
                                                            "view": "rte",
                                                            "render": null,
                                                            "icon": "icon-article",
                                                            "config": {
    
                                                            }
                                                        },
                                                        "active": false
                                                    }
                                                ],
                                                "active": false
                                            }
                                        ],
                                        "label": "Celá šířka",
                                        "hasConfig": false,
                                        "id": "77464469-6450-7d7b-3a01-dec0e1ad2ead",
                                        "active": false
                                    },
                                    {
                                        "name": "2 sloupce",
                                        "areas": [
                                            {
                                                "grid": 4,
                                                "allowAll": false,
                                                "allowed": [
                                                    "rte",
                                                    "media",
                                                    "macro"
                                                ],
                                                "hasConfig": false,
                                                "controls": [
                                                    {
                                                        "value": {
                                                            "focalPoint": {
                                                                "left": 0.5,
                                                                "top": 0.5
                                                            },
                                                            "id": 21821,
                                                            "image": "/media/1089/graf_vysledky.png"
                                                        },
                                                        "editor": {
                                                            "name": "Image",
                                                            "alias": "media",
                                                            "view": "media",
                                                            "render": null,
                                                            "icon": "icon-picture",
                                                            "config": {
    
                                                            }
                                                        },
                                                        "active": false
                                                    }
                                                ],
                                                "active": false
                                            },
                                            {
                                                "grid": 4,
                                                "allowAll": false,
                                                "allowed": [
                                                    "rte",
                                                    "media",
                                                    "macro"
                                                ],
                                                "hasConfig": false,
                                                "controls": [
    
                                                ]
                                            }
                                        ],
                                        "label": "2 sloupce",
                                        "hasConfig": false,
                                        "id": "e25af2d4-a855-a7dc-bdab-a80e12a579ea",
                                        "active": false
                                    }
                                ]
                            }
                        ]
                    }
                }
    
Please Sign in or register to post replies

Write your reply to:

Draft