简体   繁体   English

Reveal.js HTML代码语法高亮显示而不呈现它

[英]Reveal.js HTML Code syntax highlighting without rendering it

Question for reveal.js users. reveal.js用户的问题。

I am trying to show a HTML markup in my reveal.js presentation. 我试图在reveal.js演示文稿中显示HTML标记。 Issue is it renders the html block within my Code syntax highlighting block so the markup can not be seen. 问题是它在我的代码语法高亮显示块中呈现html块,因此无法看到标记。

Is there a way around this? 有没有解决的办法?

example below 以下示例

<section>
    <h2>Pretty Code</h2>
        <pre>
            <code contenteditable>

                <form id="demo-form" data-validate="parsley">
                <label for="fullname">Full Name * :</label>
                <input type="text" id="fullname" name="fullname" data-required="true" />

                <label for="email">Email * :</label>
                <input type="text" id="email" name="email" data-trigger="change" data-required="true" data-type="email" />

                <label for="website">Website :</label>
                <input type="text" id="website" name="website" data-trigger="change" data-type="url" />

                <label for="message">Message (20 chars min, 200 max) :</label>
                <textarea id="message" name="message" data-trigger="keyup" data-rangelength="[20,200]"></textarea>
                </form> 

            </code>
        </pre>
</section>

Escape the html tags, and then all should look ok. 转义html标签,然后一切都应该看起来不错。 Here is a tool that convert raw HTML to escaped strings: http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php 这是一个将原始HTML转换为转义字符串的工具: http//www.accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php

So you have to copy the code section enclosed between the <code> html markup. 所以你必须复制<code> html标记之间的代码部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM