CKEDITOR: how to I convert ALL html entities

。_饼干妹妹 提交于 2019-12-22 11:08:34

问题


here is the list: http://www.elizabethcastro.com/html/extras/entities.html I either want to enable all of them, or disable all of them... (aside from < and > of course)

Is there a way to do this?

there is the config.entities_additional = "", but that is a comma separated list of all the entities you want to store.

preferably, I'd like to disable the entities entirely, but setting config.entities = false; doesn't do anything. o.o

@Cheery's answer solves the situation where the editor uses the config.js file.

however,

        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);

Still has the HTML entities.


回答1:


Set all of them to false:

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


来源:https://stackoverflow.com/questions/9507250/ckeditor-how-to-i-convert-all-html-entities

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!