2012-02-29 20 views
3

这里是名单:http://www.elizabethcastro.com/html/extras/entities.html 我不是想使所有的人,或禁止他们都...(从<一旁>当然)CKEDITOR:如何将我转换所有的HTML实体

是有办法做到这一点?

还有config.entities_additional =“”,但是这是以逗号分隔的所有要存储的实体列表。

最好,我想完全禁用实体,但设置config.entities = false;没有做任何事情。 o.o

@ Cheery的答案解决了编辑器使用config.js文件的情况。

然而,

 CKEDITOR.replace("selected_text_actual", { 
      uiColor: "#F5F5F5", 
      toolbar: "myToolbar", 
      scayt_autoStartup: false, 
      enterMode: CKEDITOR.ENTER_BR, 
      forcePasteAsPlainText: true, 
      forceSimpleAmpersand: true, 
      height: '170px', 
      entities: false, 
      basicEntities: false, 
      entities_greek: false, 
      entities_latin: false, 
      toolbarCanCollapse: false, 
      resize_enabled: false, 
      disableNativeSpellChecker: false, 
      removePlugins: 'elementspath', 
      editingBlock: false}).setData(text_for_editor); 

仍然有HTML实体。

回答

9

集他们都false

config.entities = false; 
config.basicEntities = false; 
config.entities_greek = false; 
config.entities_latin = false; 
+0

这适用于使用该配置文件中的CKEDITOR。但是如何设置这些内联? – NullVoxPopuli 2012-03-01 01:08:04

+0

@ TheLindyHop它适用于在配置中使用这些选项启动的CKEditor的任何实例。我只是试了一下,它的工作。检查“text_for_editor”的内容。 – Cheery 2012-03-01 01:23:30

+0

我发现这是在配置中留言的问题。 o.o – NullVoxPopuli 2012-03-01 03:09:03