Perspective: How to format parts of a Label differently?

Is it possible to format a Label differently throughout the text? e.g. to make words italic or bold?

The fox jumped over the chicken

I don’t believe so, but the Markdown component can.

<html>The <b>fox</b> jumped over the <i>chicken</i>

1 Like

I think the previous post should have a closing html tag (not required, but safer). Also, you can do the same thing with markdown language:

<html>The <b>fox</b> jumped over the <i>chicken</i>.</html>

But the **chicken** had the last *laugh*.

Result:
Screen Shot 2020-11-09 at 12.43.38PM

5 Likes

So, I am attempting the same thing but this does not appear to work. Did something change over the last few updates?

And, I'm assuming we edit the label.props.text here. I've tried the HTML and the ** tags, but Perspective simply displays everything I type.

Thanks,
Mike

No, we're using the Perspective Markdown component.

The Markdown syntax is what's used on the post editor on this forum.

2 Likes

You have to use the Markdown component. Arbitrary HTML elements are only supported in the markdown component if you explicitly enable them on the component. Basic text styling like bold, italic, strikethrough is natively supported using markdown syntax.

1 Like

I just realized that we are talking about a component, lol.

I was wondering how I would use the Markdown from this site, Markdown project and Perl...

Thanks guys!