【问题标题】:Some problems in insertion of code snippet inside Joomla articlesJoomla文章中插入代码片段的一些问题
【发布时间】:2013-02-09 16:35:34
【问题描述】:

我正在为我的技术博客使用 Joomla 2.5。在我的文章中,我使用预装的 Code Highlighter (GeSHi) 插件添加了一些代码 sn-p。

所以,我以如下方式插入一个代码sn-p:

我以 HTML 模式打开编辑器,并在其中输入以下代码:

<pre xml:java="" lines="true">/**
 * The HelloWorldApp class implements an application that
 * simply prints "Hello World!" to standard output.
 */
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}
</pre>

剪辑在我的文章中得到了很好的展示,您可以在此处看到(例如): http://scorejava.com/index.php/spring-spring-mvc/corso-spring-core-framework/53-18-autowiring-mediante-costruttore-in-spring

问题是,如果我尝试复制和粘贴 sn-p 内部的代码(例如,如果我将其粘贴到记事本中),则会丢失缩进 :-(

为什么?怎么了?

Tnx 安德烈亚

【问题讨论】:

    标签: php joomla content-management-system joomla2.5 geshi


    【解决方案1】:

    对我来说没问题!复制粘贴,内容格式正确

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-09
      • 2012-12-09
      • 1970-01-01
      • 2011-04-20
      • 2017-03-16
      • 1970-01-01
      • 2012-05-26
      • 1970-01-01
      相关资源
      最近更新 更多