Search code examples
special-charactersredactor

Imperavi Redactor 9 removes &nbsp ; character


How to disable the Redactor editor auto remove &nbsp ; ? Please help.


Solution

  • to fix clean  

    1. open redactor.js
    2. find
    syncClean: function(html)
    {
      if (!this.opts.fullpage) html = this.cleanStripTags(html);
    
      html = $.trim(html);
    
      // removeplaceholder
      html = this.placeholderRemoveFromCode(html);
    
      // remove space
      html = html.replace(/​/gi, '');
      html = html.replace(/​/gi, '');
      // html = html.replace(/ /gi, ' '); // COMMENT THIS!
      ...
    }
    
    1. comment replacing string

    profit! :)