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

Preview button code highlight rendering problem #315

Open
Gitawake opened this issue Oct 21, 2020 · 3 comments
Open

Preview button code highlight rendering problem #315

Gitawake opened this issue Oct 21, 2020 · 3 comments

Comments

@Gitawake
Copy link

In Django's admin page, I preview the sample code after using it. The code is not highlighted.

This is the picture in the input box
image

This is a preview of the rendering
image

@toza-mimoza
Copy link

Same for me. Did you find a solution?

@toza-mimoza
Copy link

toza-mimoza commented Mar 25, 2021

Apparently advcode plugin for Tinymce is a premium paid feature, which you can only acquire if you purchase a $30 a month "Essentials" package.

@toza-mimoza
Copy link

toza-mimoza commented Mar 25, 2021

Solved it by applying highlights.js JavaScript at the top of my template like this:

<link rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

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

2 participants