Apply formatting (bold/underline) to specific words in Alert text?

You can also use the data property

template = """**{title}**

{body}
"""


def rt_alert(title, body, large=False):
    rt = RichText(content=template)
    rt.data = {"title": title, "body": body}
    return alert(rt, large=large)

1 Like