Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#5341 closed Bug (fixed)

<br /> tag only in Firefox

Reported by: Karsten Owned by:
Priority: Must have (possibly next milestone) Milestone:
Component: Core : Output Data Version: 3.2
Keywords: Cc:

Description

Hello,

Ik have on my website an CK Editor placed where users can give response to the articles on my website.

If I user Google Chrome (latest) on a Mac, everything works fine.

But as I use Firefox 3.6 (with no non-default addons), the default content is <br />.

It show's good, but if you click in the text screen, sometimes he springs to the second line en makes an <br /> tag. But he does'nt do this always.

But if I only give one word or line of text, there's is always before, or after it an <br /> tag automaticly created.

The only thing I can think of that can do something with this is the config setting:

config.enterMode = 2;

Is there any solution to this problem?

Change History (6)

comment:1 Changed 14 years ago by omnishelley

you can modify _source/plugins/wysiwygarea/plugin.js 434 line:

if ( editor.config.enterMode == CKEDITOR.ENTER_BR ){

if(domDocument.innerText!=null) add this statement.

domDocument.createElement( 'br', { attributes: '_moz_dirty' : "" } } ).replace( bogusText );

}

comment:2 in reply to:  1 Changed 14 years ago by Karsten

Replying to omnishelley:

you can modify _source/plugins/wysiwygarea/plugin.js 434 line:

if ( editor.config.enterMode == CKEDITOR.ENTER_BR ){

if(domDocument.innerText!=null) add this statement.

domDocument.createElement( 'br', { attributes: '_moz_dirty' : "" } } ).replace( bogusText );

}

Thanks for you're reply. But what can I change this in, of can I delete the line: domDocument.createElement( 'br', { attributes: '_moz_dirty' : "" } } ).replace( bogusText ); ?

comment:3 Changed 14 years ago by omnishelley

maybe you only use ckeditor.js?

you can search '_moz_dirty' in the ckeditor.js, find the statement maybe like this:

L.createElement('br',{attributes:{_moz_dirty:}}).replace(W);

you only need insert a statement before:

if(L.innerText!=null)

totally statement like this :

if(L.innerText!=null)L.createElement('br',{attributes:{_moz_dirty:}}).replace(W);

comment:4 in reply to:  3 Changed 14 years ago by Karsten

Resolution: fixed
Status: newclosed

Thanks! That solved the problem...

Replying to omnishelley:

maybe you only use ckeditor.js?

you can search '_moz_dirty' in the ckeditor.js, find the statement maybe like this:

L.createElement('br',{attributes:{_moz_dirty:}}).replace(W);

you only need insert a statement before:

if(L.innerText!=null)

totally statement like this :

if(L.innerText!=null)L.createElement('br',{attributes:{_moz_dirty:}}).replace(W);

comment:5 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

comment:6 Changed 10 years ago by Wiktor Walc

Keywords: <br> removed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy