相关疑难解决方法(0)

格式丰富的内容的标记语言是什么?

当您开发基于Web的应用程序并且希望允许来自用户的格式丰富的文本时,您必须选择如何允许该输入.已经创建了许多不同的标记语言,因为它可能更难以清理HTML.

各种不同标记语言的优点和缺点如下:

或者换句话说,在选择使用特定标记语言时,您会考虑哪些因素.

html formatting markup markdown bbcode

12
推荐指数
2
解决办法
1330
查看次数

使用 nl2br() 时忽略 pre 标签

我想在使用 nl2br 时忽略以下标签。我有标准的 pre,还有一些特定的 pre 标签。当我这样做是在<br>标签内<pre>粘贴标签。

string = "Here is some text

<pre>
   <xml>
     <item></item>
     <name></name>
   </xml>
</pre>

That includes new lines and carriage returns
what can i do to add <p> and <br> tags but not to the text below inside
the <pre> tags </pre>.

<pre class="brush: csharp; title: ;" title="">
    public MainPage()
{
    // select the culture (de, it, fr, tr are supported)
    var ci = new System.Globalization.CultureInfo("tr-TR"); // de-DE etc

    // this controls …
Run Code Online (Sandbox Code Playgroud)

php nl2br

1
推荐指数
1
解决办法
1228
查看次数

标签 统计

bbcode ×1

formatting ×1

html ×1

markdown ×1

markup ×1

nl2br ×1

php ×1