question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for rendering links inside `dcc.Markdown` as `dcc.Link` for single page dash apps

See original GitHub issue

I use dcc.Markdown really extensively in dash-docs. It’s great! However, a few things would make my life a lot easier:

  1. (Done!) GitHub style language tags, that is:
``python
def dash():
     pass

Edit - This has been done!

  1. Ability for the hyper links to use dcc.Link instead of the HTML link

Currently, I have to break out my dcc.Link from dcc.Markdown, which is pretty tedious: https://github.com/plotly/dash-docs/blob/58b6f84f2d8012d1ae686f1379f326a292370ee3/tutorial/getting_started_part_2.py#L260-L269

  1. (Done!) Automatic dedenting. Right now, I use textwrap.dedent everwhere in my text. If I don’t use dedent, then the markdown is formatted as code (4 indents in markdown is code). It would be nice if I could just pass in dedent=True or something

Edit - This has been done!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Oct 3, 2019

Can we find a way to expose this within the markdown syntax, rather than having a prop to decide for all relative links in that component? Would be nice, for folks hosting multiple dash apps on the same domain for example, if each link decided that on its own.

What about prefixing the url with a special character? so [Other app](/app2) would be a regular <a> but something like [Other page](%/page-2) would be a <Link>?

0reactions
Marc-Andre-Rivetcommented, Oct 3, 2019

I wonder if this is sufficient and whether all Markdown libraries expose syntax extensions / augmentations https://github.com/jonschlinkert/remarkable/blob/master/docs/plugins.md

Parsing rules are divided into three differents kind of rules (core, block and inline).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown | Dash for Python Documentation | Plotly
Markdown is a component for rendering Markdown in your Dash app. Examples. Find a few usage examples below. For more examples of minimal...
Read more >
Support for rendering links inside `dcc.Markdown` as `dcc.Link ...
I use dcc.Markdown really extensively in dash-docs . It's great! However, a few things would make my life a lot easier: 1. (Done!)...
Read more >
displaying text/links in Plotly dashboard - python
I would just like to take the output from this function and make it into a dash app page. I've tried dcc.Markdown but...
Read more >
Markdown Component - Plotly Dash - YouTube
Learn to use Markdown in Plotly Dash, making text formatting for your app a lot quicker and easier. And if you get reallly...
Read more >
Use Mathjax in your Python Web App - Plotly Dash - YouTube
Learn to combine LateX inside your Dash apps using Mathjax. Mathjax is a library to incorporate and display math in the web browser....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found