I am using a plugin named CodeHighlighter to insert a code snippet inside articles in my Joomla 2.5 website using JCE.
To insert the code snippet, I do the following in JCE:
I swap to the HTML code view and, for example, I insert something like this:
<pre class="brush:java">
package com.tutorialspoint;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextStartedEvent;
public class CStartEventHandler
implements ApplicationListener<ContextStartedEvent>{
public void onApplicationEvent(ContextStartedEvent event) {
System.out.println("ContextStartedEvent Received");
}
}
</pre>
This works well except for this part of code: <ContextStartedEvent>
which is eliminated by JCE. I have also tried using a no WYSIWIG editor and there is no problem.
So the problem seems to be that JCE sees <ContextStartedEvent>
as a tag and not as a legal part of my Java code snippet, and so deletes it...
Do you have some idea about how prevent JCE from deleting this part of code?