add a css resource file

//add css to head
$("<link/>", { "rel": "stylesheet", "type": "text/css", "href": "https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css" }).appendTo("head");

6 comments:

rohit bhatia said...

I am trying to change the look and feel of my spotfire dashboard, and I have a CSS file for it. Is this code snippet for that?
If so, could you please elaborate, where do I add this code, or if you explain the process.

Blake said...

I tried and got the error: "the element 'link' is not supported"

Jose Leviaguirre said...

Blake,

This should work on spotfire < 6 because text areas had no html option. In any case, you might want to check if the html sanitation is off: Tools > Administration Manager > [preferences] > selected group:yourGroup > TextArea.TextAreaPreferences.PerformHtmlSanitation:False

Blake said...

Thanks Jose,

I set performHtmlSanitation to False, and had to save and restart spotfire for it to take effect. Thanks Much!

Mark Salisbury said...

Jose,

Will this still work in Spotfire 7.0? I cannot get this to work, as the text is just interpreted as text.

Jose Leviaguirre said...

Mark, I am not sure. I have not had the chance to play with 7.0. T