Recommended way of representing list of strings

Hi,

I would like to have a list of status codes with a line break between each of them. If I have a string with \n, it gets ignored by StaticText etc. How can I display a param.list of strings as a column? Or a param.String and preserve the line breaks.

Thanks for all cool stuff!

Hi @Wiggan
Would HTML do the job for you?

Hello!
I don’t think it has a from_param or can be linked in a trivial way, or can it?

You can manually link it like:

import param
import panel as pn

class Abc(pn.viewable.Viewer):

    my_string = param.String(doc="A string parameter")

    def __init__(self, **params):
        super().__init__(**params)
        pane = pn.pane.Markdown()
        pane.link(self, object="my_string", bidirectional=True)
        self.pane = pane
    
    def __panel__(self):
        return self.pane

abc = Abc()
abc.a = "abc\n\ndef"
abc