panel
panel copied to clipboard
js link documentation appears to be wrong
Code referenced in panel documentation here seems to be wrong.
I used this code locally with panel 1.3.6 by running :
import panel as pn
markdown = pn.pane.Markdown("<b>Markdown display</b>", width=400)
text_input = pn.widgets.TextInput(value="Markdown display")
code = '''
target.text = '<b>' + source.value + '</b>'
'''
text_input.jslink(markdown, code={'value': code})
row = pn.Row(text_input, markdown)
row.show()
and it shows the behavior you can see in this screenshot
As described on the documentation, the text on the right is supposed to be bold but finally it is not. Is there a problem in the code of the documentation ?
I will mark this as a bug, the reason for this is that we usually sanitize HTML code sent to the model which means that the model will attempt to unsanitize it, which in this case is resulting in the formatting being removed.