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

Customization of markdown renderer and editor #209

Closed
Uzay-G opened this issue Feb 17, 2021 · 3 comments
Closed

Customization of markdown renderer and editor #209

Uzay-G opened this issue Feb 17, 2021 · 3 comments

Comments

@Uzay-G
Copy link
Member

Uzay-G commented Feb 17, 2021

Linked to #203 (comment).

Would be nice for users to be able to customize the markdown plugins / renderer used and with which options.

Ideas on how we could structure this would be really useful because I'm not sure what the best design would be.

@edditler
Copy link
Contributor

It would probably be best to include more sections in config.yml next to the search configuration and allow users to change those settings from within the app. The simplest settings are these:

var md = require('markdown-it')({
  html:         true/false,        // Enable HTML tags in source
  xhtmlOut:     true/false,        // Use '/' to close single tags (<br />).
  breaks:       true/false,        // Convert '\n' in paragraphs into <br>
  linkify:      true/false,        // Autoconvert URL-like text to links
  typographer:  true/false,
  highlight:    function (/*str, lang*/) { return ''; }

What makes it a bit messy is that this config has to be passed to each template or put into a global variable like session.config.

@BrianGilbert
Copy link
Contributor

#195 related

@Uzay-G
Copy link
Member Author

Uzay-G commented Jun 28, 2021

This is fixed in #241 !

@Uzay-G Uzay-G closed this as completed Jun 28, 2021
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

3 participants