I'm talking about a blank webpage ... need html code for the job.
-OptimalDesigns
I'm in for the job!
So, if I understand you correctly, you're talking about a
Syntax Highlighter, such as:
https://highlightjs.org
An easy setup is this:
1) First, you need to load the highlighter from CDN:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/go.min.js"></script>
<script>hljs.highlightAll();</script>
2) Insert the code in the tags for automatic loading:
This will find and highlight code inside <pre><code> tags; it tries to detect the language automatically. If automatic detection does not work for you, you can specify the language in the class attribute:
<pre><code class="language-html">...</code></pre>
You can find a list of available programming languages to highlight here:
https://highlightjs.org/download
Nice to let user drag height to what is best for them.-OptimalDesigns
So, you are able to insert the code (and language) on the page and only need the user to control the height of the highlighted code window?
(It is doable! Even if another highlighter may be suitable. 'Where there is a will there's a way' )Thanks.