I am trying to figure out how to italicize text in a Splunk dashboard. I've done this using the HTML Tags and it works but it's not giving me what I want.
Is there a way to italicize text using simple XML?
Thank you,
Marco
You are correct - the dashboard XML schema doesn't support child nodes of the description tag, which you would need in order to be able to apply a different style.
The closest you can get is to put an HTML panel as your very first panel in your dashboard, but this will appear below any fieldset you might have.
Another possibility is that you could apply a style to this HTML panel so it appears elsewhere on the page, but calculating where that should be might be tricky 😀
@ITWhisperer Thank you, Originally I tried that but it creates a whole new "Panel" . At this point I am starting to believe italics cannot be done inside the description tags. Correct me if I'm wrong.
Best Wishes,
Marco
You could try putting the HTML block in the fieldset (if you have one) so it appears closest to the top of the dashboard
<fieldset submitButton="false" autoRun="true">
<html id="subheading">
This line contains some <span style="font-style: italic;">italic text</span> in the middle
</html>
You are correct - the dashboard XML schema doesn't support child nodes of the description tag, which you would need in order to be able to apply a different style.
The closest you can get is to put an HTML panel as your very first panel in your dashboard, but this will appear below any fieldset you might have.
Another possibility is that you could apply a style to this HTML panel so it appears elsewhere on the page, but calculating where that should be might be tricky 😀
Which text are you trying to italicise? Depending where it is, you may be able to apply
font-style: italic;
to the text.
@ITWhisperer I am trying to add Italics to the description tag
<dashboard>
<label>test</label>
<description>I want to italicize this text ---> This Text <-----</description>
</dashboard>
You can make the whole description italics
<panel depends="$stayhidden$">
<html>
<style>
p.description {
font-style: italic;
}
</style>
</html>
</panel>
but possibly not part of the element
Or, you could just add a block of html
<row>
<html>
This line contains some <span style="font-style: italic;">italic text</span> in the middle
</html>
</row>