Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of using template to mark up markdown in a variable #8

Open
psychemedia opened this issue Oct 22, 2020 · 0 comments
Open

Example of using template to mark up markdown in a variable #8

psychemedia opened this issue Oct 22, 2020 · 0 comments

Comments

@psychemedia
Copy link

psychemedia commented Oct 22, 2020

As a Jinja novice, if I have a template with some markdown referenced by Javascript variable, how do I style it?

Presumably, the plugin can't handle that?

The example in the docs shows how to style literal markdown, but one likely use case is trying to style markdown retrieved by by a SQL query request to the datasette API? The javascript variable is undefined if called naively as {{render_markdown(md)}}. Is there a way to write the query with a function that takes markdown and returns HTML, eg select render_markdown(md) from etc.

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

No branches or pull requests

1 participant