Skip to content

Add playground to docs - #1653

Open
waylan wants to merge 1 commit into
Python-Markdown:masterfrom
waylan:playground
Open

waylan wants to merge 1 commit into
Python-Markdown:masterfrom
waylan:playground

Conversation

@waylan

@waylan waylan commented Oct 7, 2026

Copy link
Copy Markdown
Member

Zensical provides all of the necessary assets for Pyodide, Ace, and Highlight.js out of the box as part of its support for the Markdown Exec plugin. We just need to provide the HTML. I have manually crafted the HTML that Markdown Exec would render.

Fixes #1628.

Description

AI Assistance Disclosure

  • No AI tools were used in preparing this PR.
  • If AI tools were used, I have disclosed which ones, and fully reviewed and verified their output.

Checklist

@waylan

waylan commented Oct 7, 2026 •

Copy link
Copy Markdown
Member Author

My thinking here is that Python-Markdown is a library first and foremost. Therefore, we should provide a Python environment for playing with the library. As it turns out, Zensical makes it extremely easy to provide that. We could always add an alternative playground which works more like the demo at https://dingus.python-markdown.workers.dev/ in the future.

I considered creating another custom fence for this, but as it is not going to be reused, the single page of raw HTML is simpler to implement and update.

@waylan waylan changed the title Add playgorund to docs Add playground to docs Oct 7, 2026
Zensical provides all of the necessary assets for Pyodide, Ace, and Highlight.js
out of the box as part of its support for the Markdown Exec plugin. We just
need to provide the HTML. I have manually crafted the HTML that Markdown
Exec would render.

Fixes Python-Markdown#1628.
@waylan

waylan commented Oct 7, 2026

Copy link
Copy Markdown
Member Author
Playground-Python-Markdown-10-07-2026_03_09_PM

@facelessuser

Copy link
Copy Markdown
Collaborator

Yep, I think this is a reasonable solution. I was working to reduce some of my related work to something far simpler, but I honestly forgot that Markdown Exec existed. So yeah, I think this is a good solution for what we want here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an interactive Demo to Documentation?

2 participants