CKEditor unwanted   characters

后端 未结 10 887
误落风尘
误落风尘 2020-12-02 08:13

How can I disable CKEditor to get me every time  , when i don\'t want them? I\'m using CKEditor with jQuery adapter.

I don\'t want to have any

10条回答
  •  不知归路
    2020-12-02 08:33

    There is another way that a non breaking space character can occur. By simply entering a space at the end of a sentence.

    CKEditor escapes basic HTML entities along with latin and greek entities.

    Add these config options to prevent this (you can also add them in your config file):

    CKEDITOR.on( 'instanceCreated', function( event ) {
     editor.on( 'configLoaded', function() {
    
      editor.config.basicEntities = false;
      editor.config.entities_greek = false; 
      editor.config.entities_latin = false; 
      editor.config.entities_additional = '';
    
     });
    });
    

    These options will prevent CKEditor from escaping nbsp gt lt amp ' " an other latin and greek characters.

    Sources: http://docs.ckeditor.com/#!/api/CKEDITOR.config http://docs.ckeditor.com/source/plugin48.html#CKEDITOR-config-cfg-basicEntities

提交回复
热议问题