🐒 πŸ‘©β€πŸ« πŸ‘¨β€πŸ« Highlighting B4X code in HTML pages using Prism

Erel

Administrator
Staff member
Licensed User
Example: https://www.b4x.com/js/

Prism is a popular JavaScript text highlighter: https://prismjs.com/index.html

It is the same library that is installed in the forum and highlights the code.
The B4X rules and a modified CSS file are attached.

Note that it is not 100% perfect due to it being a context free parser however overall it does a good job and the code looks much better than plain text.
 

Attachments

ilan

Expert
Licensed User

Erel

Administrator
Staff member
Licensed User
Top