Reveal.js HTML代码语法高亮显示而不渲染它 [英] Reveal.js HTML Code syntax higlighting without rendering it
问题描述
对于reveal.js用户,您可以快速提问。
Hello quick question for reveal.js users.
我正在尝试在reveal.js演示文稿中显示HTML标记。问题是它在我的代码语法高亮区域中呈现html块,因此无法看到标记。
I am trying to show a HTML markup in my reveal.js presentation. Issue is it renders the html block within my Code syntax higlighting block so the markup can not be seen.
有没有办法解决这个问题?
Is there a way around this?
以下示例
<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>
谢谢。
推荐答案
转义html标签,然后一切都看起来不错。这是一个将原始HTML转换为转义字符串的工具: http:// www.accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php
Escape the html tags, and then all should look ok. Here is a tool that convert raw HTML to escaped strings: http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php
所以你必须复制代码部分包含在< code>
html标记之间。
So you have to copy the code section enclosed between the <code>
html markup.
这篇关于Reveal.js HTML代码语法高亮显示而不渲染它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!