S
S
Sergey Karbivnichy2021-03-23 14:53:26
Joomla
Sergey Karbivnichy, 2021-03-23 14:53:26

Why is there no highlighting of code examples in the article?

When I create a material, the highlighting of code examples is displayed as it should:
6059d66edadc0178285838.png
But after publishing, the highlighting is not displayed:
6059d6876d8b4675451676.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2021-03-23
@hottabxp

natoje-zlo suggested that there are no highlight styles in the template. Most likely it is. I solved the problem like this - downloaded prismjs . I put prism.css in the templates/my_template/css folder, and added the following lines to prism.js in templates/my_template/js and index.php of the template:

JHtml::_('stylesheet', 'prism.css', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'prism.js', array('version' => 'auto', 'relative' => true));

After that, everything worked as it should.
I'm not a web developer, so I don't know if this method is correct. But everything works as it should:6059f08b810b2996797783.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question