dortmundbvb0624 2013-02-14 15:17
浏览 83

为什么Joomla中的JCE会删除我的代码片段中的部分代码? (JCE认为它是一个标签)

I am using a plugin named CodeHighlighter to insert code snippet inside articles in my Joomla 2.5 website.

As editor I use JCE.

To insert code snippet I do the following thing in JCE editor I do the following operation:

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>

Ok...this work well except for this part of code: which is eliminated by JCE (I have try using a no WYSIWIG editor and there is no problem)

So the problem seems to be that JCE see as a tag and not as a legal part of my Java code snippet, and so delete it...

Do you have some idea about how say to JCE to don't delete this part of code?

  • 写回答

1条回答 默认 最新

  • doujiang1939 2013-02-14 20:46
    关注

    You can try the following:

    1. Go to Global Configuration
    2. Click "Text Filters" Tab.
    3. Change "Super Users" filter type to "no filtering"
    

    This will solve problems such as these.

    • Youtube videos wont work in Joomla (code gets deleted)
    • JCE TinyMCE code cleanup deletes my styles code and scripts.
    • Inline document styles (css) gets removed by JCE or TinyMCE in Joomla
    • Code cleanup problems in JCE / TinMCE
    • Flash scripts being removed by JCE code cleanup
    评论

报告相同问题?

悬赏问题

  • ¥15 r包runway详细安装教程
  • ¥15 Html中读取Json文件中数据并制作表格
  • ¥15 谁有RH342练习环境
  • ¥15 STM32F407 DMA中断问题
  • ¥15 uniapp连接阿里云无法发布消息和订阅
  • ¥25 麦当劳点餐系统代码纠错
  • ¥15 轮班监督委员会问题。
  • ¥20 关于变压器的具体案例分析
  • ¥15 生成的QRCode圖片加上下載按鈕
  • ¥15 板材切割优化算法,数学建模,python,lingo