Defect #109

Firefox ignores styleWithCss: false

Added by Sasha Rudenko about 2 years ago. Updated 6 months ago.

Status:Assigned Start date:08.04.2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:1.x
Browser:

Description

FF 3.6, MacOSX 10.6.3
Вместо использования соответствующих тэгов, все равно используется span со стилями.
В хроме 5.0.3 работает корректно.

--

UP!

Check elrte.html and elrte.src.html for case in options, apply to ELDORADO as well

History

Updated by Troex Nevelin almost 2 years ago

  • Subject changed from инор styleWithCss: false в Firefox 3.6 to игнор styleWithCss: false в Firefox 3.6

Updated by Troex Nevelin almost 2 years ago

  • Target version changed from 1.0rc4 to 1.0

Updated by Troex Nevelin almost 2 years ago

  • Target version changed from 1.0 to 1.x

Updated by Guilherme Barile over 1 year ago

I don't speak russian, but feel this relates to the problem I was facing - firefox adding <span style... instead of <b> <em> and other tags

I fixed the problem the function on line 4120 of elrte.full.js, forcing styleWithCSS to be called each time. Suggestion came from http://code.google.com/p/jwysiwyg/issues/detail?id=26

elRTE.prototype.ui.prototype.buttons.button.prototype.command = function() {
    this.rte.history.add();
    try {
        this.rte.doc.execCommand('styleWithCSS', false, this.rte.options.styleWithCSS); // THIS LINE
        this.rte.doc.execCommand(this.name, false, this.val);
    } catch(e) {
        return this.rte.log('commands failed: '+this.name);
    }

    this.rte.ui.update(true);
}

Updated by Troex Nevelin over 1 year ago

Thanks for the link, this is known problem with FF. Will try to fix it in next version.

Updated by Guilherme Barile over 1 year ago

I guess the docs at http://elrte.org/redmine/projects/elrte/wiki/Docs_EN#Options refer to the option as styleWithCss instead of styleWithCSS.
The code above fixed the css issue for me, but don't know about the effect on other browsers.

thanks for the great editor.

Updated by Dmitry Levashov over 1 year ago

  • Subject changed from игнор styleWithCss: false в Firefox 3.6 to Firefox ignores styleWithCss: false

Updated by Troex Nevelin 11 months ago

  • Status changed from New to Invalid

won't be fixed in current version

Updated by TecnoWeb L.L.C 6 months ago

I found small method to fix this issue for temporaney :)

/* make iframe editable */
    if ($.browser.msie) {
        this.doc.body.contentEditable = true;

// * temporany fix for elrte bug on firefox */
    } else if ($.browser.mozilla) { 

      this.doc.body.contentEditable = true;
// * end temporany fix for elrte bug on firefox */

    } else {
        try { this.doc.designMode = "on"; } 
        catch(e) { }
        this.doc.execCommand('styleWithCSS', false, this.options.styleWithCSS);
    }
/* and set s as 1  for elrte issue */
var r = '1'.rangeCount > 0 ?  '1'.getRangeAt(0) : this.rte.doc.createRange();

Updated by Troex Nevelin 6 months ago

  • Status changed from Invalid to Assigned

Wow it looks interesting

Also available in: Atom PDF