Markdown为什么<>中的内容不正常显示为源代码?

在Markdown中,尖括号<>中的内容会被解释为HTML标签,因此不会正常显示。这是因为Markdown的设计目标之一就是允许在文档中直接嵌入HTML。

1. 解决办法

将尖括号替换为HTML实体:

  • &lt; 替换为: &amp;lt;
  • &gt; 替换为: &amp;gt;
  • 2.实例

  • Markdown 输入:
    这是一个HTML标签:&lt;div class=&quot;example&quot;&gt;内容&lt;/div&gt;
  • 渲染结果:
    这是一个HTML标签:&lt;div class="example"&gt;内容&lt;/div&gt;
  • 3.其他办法

    (1)纯文本展示敏感字符:在字符前加 反斜杠(Markdown 原生转义,比记实体简单),如 \# 展示#\* 展示*

    (2)想要展示简单转义后的原码: [code] <div>test</div>

    Bludit force http to https

    1.Set "Site URL" from “http” to “https”

    The redirect from http to https can often be set in the admin panel,just set http to https at "Settings" > "General" > "Advanced" > "Site URL".

    If it cannot be modified in the admin panel, then it is necessary to directly modify the "URL" of "site. php" in the "blcontent/databases" directory.

    2.Modify "index.php" in themes and add force HTTP to HTTPS code

    Open the "index.php" file in the theme directory,and add the code to force HTTP to HTTPS:

    如何把Bludit撰写文章的默认编辑器换成支持Markdown格式的Tail.writer(或EasyMDE)

    How to change the editor

    By default, Bludit uses the TinyMCE Editor - a simple and clean HTML editor. But you can also choose SimpleMDE which supports Markdown Code. TinyMCE and EasyMDE are pre-installed on Bludit by default; both are plugins and you can find them in the plugin section.

    How to download Tail.writer

    here for download: Tail.writer

    then,installed it in the "plugins" directory.

    How to switch from TinyMCE to Tail.writer

  • Log in into the ​Admin panel​.
  • Go to Plugins on the left menu.
  • Find the plugin TinyMCE and click on the Deactivate button.
  • 1 2
    下一页 »
    PDF Viewer / PDF查看器