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

How to insert Code Snippet? #240

Open
VadymKhodak opened this issue Mar 2, 2021 · 3 comments
Open

How to insert Code Snippet? #240

VadymKhodak opened this issue Mar 2, 2021 · 3 comments

Comments

@VadymKhodak
Copy link

I'm sorry for bothering you.
But I can't find a way to insert code snippets to blog text.
Is anyone here who can help me?

@CVYY39
Copy link
Contributor

CVYY39 commented Mar 2, 2021

You can format text as code with the third button in from the left side of the toolbar on the rich text editor.

That said, I don't know whether it supports syntax highlighting without jumping through some hoops.

@VadymKhodak
Copy link
Author

Thank you so much!
I want to find a solution to have highlighted code snippet.
Like that
image

@Pei2tech
Copy link

Pei2tech commented Apr 20, 2021

The wagtail-markdown can reach your requirement. please refer to the link: https://github.com/torchbox/wagtail-markdown. After installing wagtail-markdown, you have to modify templates and follow the instruction to add Abstract base classes. The body of the admin page will show as below:
image

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