I have read about this quite a bit, and just want to see if I missed any recent developments. But it would appear that the CSS files you can include in a Grid page (setup in Data Types) are only applied to RTE content, and not to anything else on the grid page.
I am using the off the shelf macro editor (within the row, in the grid), and the CSS is not applied to that. Is there a new and better way to do this other than applying CSS to the entire backend or doing inline css (which is what I am currently doing, but that's a maintenance nightmare)
As stated above I am using the "off the shelf macro editor (within the row, in the grid)". There has been a little modding so I can also include RTE with the macro (but that's unrelated). The problem I am having is that for example this: "
some text
" is rendering as "<p>some text</p>" (displaying as escaped html).
Before you all shout use Html.Raw, I did. @Html.Raw(Model.MacroParameters["oText"].ToString()) still renders as "<p>some text</p>".
The code I am using to get round this (and it works) is:
var oText = Model.MacroParameters["oText"].ToString();
....
@Html.Raw(HttpUtility.HtmlDecode(oText.ToString()))
but I suspect I have missed something somewhere and this is overkill, can someone please advise.
I am also commenting on this because through out all my searches I couldn't find anything Umbraco related about this (the escaped characters), not inside macros anyway.
I am not going to be surprised if you come back to me saying I have answered my own questions, and that's not a problem. I just want to be sure I am not missing anything.
Umbraco Grid CSS Issues and Html.Raw problems
Hi All,
A couple of questions please.
I am using the off the shelf macro editor (within the row, in the grid), and the CSS is not applied to that. Is there a new and better way to do this other than applying CSS to the entire backend or doing inline css (which is what I am currently doing, but that's a maintenance nightmare)
some text
" is rendering as "<p>some text</p>" (displaying as escaped html).Before you all shout use Html.Raw, I did. @Html.Raw(Model.MacroParameters["oText"].ToString()) still renders as "<p>some text</p>".
The code I am using to get round this (and it works) is: var oText = Model.MacroParameters["oText"].ToString(); .... @Html.Raw(HttpUtility.HtmlDecode(oText.ToString()))
but I suspect I have missed something somewhere and this is overkill, can someone please advise.
I am also commenting on this because through out all my searches I couldn't find anything Umbraco related about this (the escaped characters), not inside macros anyway.
I am not going to be surprised if you come back to me saying I have answered my own questions, and that's not a problem. I just want to be sure I am not missing anything.
Thanks
Stephen
is working on a reply...