Python-Markdown / markdown

A Python implementation of John Gruber’s Markdown with Extension support.
https://python-markdown.github.io/
BSD 3-Clause "New" or "Revised" License
3.78k stars 862 forks source link

Usage of python-markdown #876

Closed Yuxiang-Luo closed 4 years ago

Yuxiang-Luo commented 4 years ago

Hi there,

We started a project which need to create some dashboard in python. We decide to use Bokeh library for plotting, and for markdown (to generate standalone html) we tried pweave, however pweave seems not sponsored by big company so we have concern. So I'm trying to see if Python-Markdown meets our need. Could you please help clarify following questions:

  1. Does it support integration with Bokeh, for example how to integrate a bokeh plot figure into html or markdown document? is it easy, or have existing extension to support? or need me to write an extension? is it possible?

  2. Does it support passing parameters from python code into markdown? basically my python code will invoke python-markdown library to compile the markdown document, can I pass extra arguments/parameters into markdown's internal python code chunk? how can I do that?

Thanks!

waylan commented 4 years ago

The extension API provides access to the entire parser so that any part of it can be altered. You should be able to implement any add-on. A list of all known third party extensions can be found on the wiki. If you don't find what you need there, then yes, you will need to implement it yourself.

Yes, you can pass parameters to the parser as documented in our documentation.