如何将文本格式化为类似于stackpressflow {}工具的wordpress中的代码?

时间:2012-06-22 13:10:33

标签: wordpress wordpress-plugin wordpress-theming

我需要使用WordPress在帖子中设置文本格式,使其看起来像代码。就像在stackoverflow中一样,我们使用{}将代码与文本分开。当我在Wordpress中编写博客时,我需要做同样的事情

Example ....
code will look like that !

3 个答案:

答案 0 :(得分:2)

你喜欢这里使用的那个:http://inturnets.com/2012/06/a-nice-tackling-with-jquery-and-css.html吗?

这是syntaxhighlighter wp插件,http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/,一个非常可自定义的插件,最后你使用简单的标签,如 [html] html代码[/ html] [css] css代码[/ css]

祝你好运! :)

答案 1 :(得分:1)

Wordpress有一个预先格式化的段落样式,无需任何插件即可正常工作。只需选择文本,然后选择格式栏左侧的预格式化样式:

Illustration showing Preformatted paragraph style in WordPress

我安装了一个插件,但后来发现这个更简单了,它可以用于我的目的。

答案 2 :(得分:0)

这可能对您有所帮助

http://textformat.in/

如果值得

请投票