[BUG] Cannot use span tag in markdown
See original GitHub issueDescribe your context Please provide us your environment so we can easily reproduce the issue.
- replace the result of
pip list | grep dash
below
dash==1.3.1
dash-core-components==1.2.1
dash-html-components==1.0.1
dash-renderer==1.1.0
dash-table==4.3.0
Describe the bug
Html should be valid markdown, however I cannot use span tags to change the font color for example.
Here is an example:
dcc.Markdown(["foo <span style='color:red'>bar</span>"], dangerously_allow_html=True)
which is rendered like this
<p>foo <span><span style="color:red"></span></span>bar<span></span></p>
Expected behavior
“bar” should be enclosed in my defined span tag.
Edit: typo
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
styled <span> inside markdown table - html - Stack Overflow
In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and...
Read more >Markdown Syntax Documentation - Daring Fireball
To indicate a span of code, wrap it with backtick quotes ( ` ). Unlike a pre-formatted code block, a code span indicates...
Read more >Bug in formatting with markdown / span tags
When formatting the first word or line in a label cell with markdown or inline HTML (e.g. bold with asterisks or color with...
Read more >Markdown support - Doxygen Manual
Note that you cannot start a code block in the middle of a paragraph (i.e. the ... To show a literal backtick or...
Read more >Markdown Syntax | YouTrack Server Documentation - JetBrains
In YouTrack, you can format text using the Markdown markup syntax. ... You can't have more than three space characters in front of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any movement on this? Can confirm that this problem still exists in dash 1.20
You cannot embed html inside
dcc.Markdown
if there are attributes on the html element.hmm OK, I have to say I’m stumped. Our
package-lock
was holding us at 4.0.6, but bumping to 4.2.2 didn’t change this behavior. So at this point I can put what looks like identical props (with the exception of one plugin and a special renderer forcode
blocks, that the demo uses) intoreact-markdown
viadcc.Markdown
and the live demo, and the results are different. Not sure where to go from here but I’m open to suggestions.Regardless, thanks for bringing this up!