Monday 5 March 2012

Avoid ckeditor encoding

Hi
Ckeditor is a very good tool to publish data in drupal. Ckeditor can be applied on textarea and hence dull looking textarea can be changed to a good looking form.
There is a problem with Ckeditor that it take its own encoding and decoding while writing . Sometime it become hard to decode Ckeditor date in case of "'" , "-" and some special characters like these.
This problem can be solved by writing
config.htmlEncodeOutput = True;
in core/editor.js. Its default value is false. This is done to escape HTML in case when editor updates original input element.
This can also be changed in advance option field in ckeditor configuration UI. Write
config.htmlEncodeOutput = True;
in advance settings to avoid any special character encoding.
Queries and suggestions welcome.

More information on www.narendrarathore.com

2 comments:

  1. I went through alot to properly configure
    the encoding of Ckeditor 4, so here's my final configuration, might be useful for someone else:

    config.entities = false;
    config.basicEntities = false;

    config.entities_greek = false;
    config.entities_latin = false;

    config.entities_additional = '';

    config.htmlEncodeOutput = false;

    ReplyDelete
  2. There is a issue with Ckeditor that it take its own development and understanding while composing . Sometime it become difficult to decipher Ckeditor time frame in situation of "'" , "-" and some unique figures like these.



    Spybubble

    ReplyDelete