在Joomla文章中插入代码片段的一些问题


Some problems in insertion of code snippet inside Joomla articles

我的技术博客使用Joomla 2.5。在我的文章中,我使用预装的CodeHighlighter(GeSHi)插件放了一些代码片段。

因此,我以以下方式插入一个代码片段:

我以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

问题是,如果我试图复制并粘贴代码片段内部的代码(例如,如果我将其粘贴在记事本中),则会丢失缩进:-(

为什么?怎么了?

TnxAndrea

我没问题!复制&粘贴和内容正确形成