Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
i need to create macro with property editor, which stores JSON. I added property editor: Textarea, but it encodes JSON (it is with whitespaces and html entity chars) like that in DB (jsut first lines):
{\n\t"type": "serial",\n\t"pathToImages": "http://cdn.amcharts.com/lib/3/images/",\n\t"categoryField":
My input was (just first lines):
{ "type": "serial", "pathToImages": "http://cdn.amcharts.com/lib/3/images/", "categoryField": "sloupec"
I need to store it as it is. Or i need to get the original data in macro razzor script.
Do i need to create custom property editor like here: http://www.nibble.be/?p=349 or is there any more elegant way to do it?
Thank you for your ideas
Ok, that code solved my problem for this time:
@Html.Raw(HttpUtility.HtmlDecode(chartData.ToString()))
But im sure, there is some way how to store it without html entity decoding.
But still i cannot edit the JSON after saving. Because i see only in property editor:
[object Object]
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Macro - JSON property editor
Hello,
i need to create macro with property editor, which stores JSON. I added property editor: Textarea, but it encodes JSON (it is with whitespaces and html entity chars) like that in DB (jsut first lines):
My input was (just first lines):
I need to store it as it is. Or i need to get the original data in macro razzor script.
Do i need to create custom property editor like here: http://www.nibble.be/?p=349 or is there any more elegant way to do it?
Thank you for your ideas
Ok, that code solved my problem for this time:
But im sure, there is some way how to store it without html entity decoding.
But still i cannot edit the JSON after saving. Because i see only in property editor:
is working on a reply...