diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /helpcontent2/help3xsl/README.prism.js.txt | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | helpcontent2/help3xsl/README.prism.js.txt | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/helpcontent2/help3xsl/README.prism.js.txt b/helpcontent2/help3xsl/README.prism.js.txt new file mode 100644 index 000000000..96a42aa13 --- /dev/null +++ b/helpcontent2/help3xsl/README.prism.js.txt @@ -0,0 +1,56 @@ +Latest download version + +PrismJS 1.28.0 + +Using prism.js for Basic code highlight + +http://prismjs.com + +License MIT (see prism.js) + +Download page http://prismjs.com/download + +Theme: Coy + +Languages to download: +Visual Basic + +Python + +SQL + +defaults Prism pre-sets + +Plugins: +line numbers, +normalize-whitespace: configure after https://prismjs.com/plugins/normalize-whitespace/ + +Prism.plugins.NormalizeWhitespace = new NormalizeWhitespace({ +'remove-trailing': true, +'remove-indent': true, +'left-trim': true, +'right-trim': true, +/*'break-lines': 80, +'indent': 2,*/ +'remove-initial-line-feed': true, +/*'tabs-to-spaces': 4, +'spaces-to-tabs': 4*/ +}); + + +Usage: + +Add prism.js and prism.css to html page, + +Add class 'language-visual-basic' and 'line-numbers' to <code> as in + +<xsl:template match="bascode"> + <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> + <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> + <pre><code class="language-visual-basic line-numbers"><xsl:apply-templates /></code></pre> + </div> +</xsl:template> + +<xsl:template match="pycode"> + <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> + <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> + <pre><code class="language-python line-numbers"><xsl:apply-templates /></code></pre> + </div> +</xsl:template> |