-
-
Notifications
You must be signed in to change notification settings - Fork 146
Support for rendering links inside dcc.Markdown
as dcc.Link
for single page dash apps
#250
Comments
I haven't investigated this at all, I don't have a sense of how easy or difficult these items would be |
it could be a new component. similar to how github has "github style markdown", we could have |
re: syntax highlighting, ``` python
def dash():
pass
``` will get evaluated as <code class="language-python">
"
def dash():
pass
"
</code> This is behaviour suggested by the HTML spec:
As such, established syntax highlighting libraries such as highlight.js and prism.js support this CSS class name, and in theory |
I would really love it if there was a component that automatically dedented strings! it get's a bit tiresome wrapping the string with that each time when writing Dash documentation. It could potentially be a flag that could be switched off too. |
The only remaining item in here is to treat relative links like We might have to make this opt-in, as there might be relative links that aren't Dash links. Not sure what to name this. Some options:
|
dcc.Link
, autodedenting?dcc.Markdown
as dcc.Link
for single page dash apps
I think we could use the support for custom "renderers" in dash-core-components/src/components/Markdown.react.js Lines 115 to 119 in eb38442
would take a prop e.g. <Markdown
...
renderers={{link: LinkRenderer}}
/>
|
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 |
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
|
I use
dcc.Markdown
really extensively indash-docs
. It's great! However, a few things would make my life a lot easier:Edit - This has been done!
dcc.Link
instead of the HTML linkCurrently, I have to break out my
dcc.Link
fromdcc.Markdown
, which is pretty tedious:https://github.com/plotly/dash-docs/blob/58b6f84f2d8012d1ae686f1379f326a292370ee3/tutorial/getting_started_part_2.py#L260-L269
textwrap.dedent
everwhere in my text. If I don't usededent
, then the markdown is formatted as code (4 indents in markdown is code). It would be nice if I could just pass indedent=True
or somethingEdit - This has been done!
The text was updated successfully, but these errors were encountered: