Opened 16 years ago

Closed 13 years ago

#1621 closed Bug (worksforme)

Format combo normal option produces P tag even if in BR mode only!

Reported by: bongobongo Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: FCKeditor 2.5
Keywords: Cc:



You guys are never sleeping. :-) Interesting release this 2.5 version but I have something I really hope you can fix.

I'm involved in a project that must only allow for some specific tags to be used. P tags are not allowed, so therefore I'm using this in my fckconfig.js:

FCKConfig.EnterMode = 'br'; FCKConfig.ShiftEnterMode = 'br';

Then I open the 2.5 version in my browser:


  1. Testing using Format combo to apply and remove some tags.
  • Hitting New Page button to clear the content.
  • Entering this source:
    This is first line<br />
    <br />
    This is another line<br type="_moz" />
  • Then selecting first line and selecting H1 from Format combo and getting this source:
    <h1>This is first line</h1>
    <br />
    This is another line<br type="_moz" />
  • Then select first line again and select Normal from Format combo and getting this source:
    <p>This is first line</p>
    <br />
    This is another line<br type="_moz" />

URK! THAT was not expected since I'm in BR mode only.

Is there a way to make Normal in the Format combo to just remove the previously applied tag? Could this be done in a short amount of time please :-)


Then another finding, kind of related (but maybe not).

Currently I'm using version 2.4.3 in my project. There I have used the Style combo in order to let the user apply some specific styles to the text. So in fckstyles.xml I have this:

<Style name="Title H1" element="h1" />
<Style name="Title H2" element="h2" />
<Style name="Title H3" element="h3" />
<Style name="Title H4" element="h4" />
<Style name="Title H5" element="h5" />

If I use the above fckstyles with version 2.5 and start with this source:

This is first line<br />
<br />
This is another line<br type="_moz" />
  • And then apply the H1 tag using the Style combo, then I get this source:
    <h1>This is first line</h1>
    <br />
    This is another line<br type="_moz" />

So far so good: But if I then select the first line again now actually having the h1 tag and then select H1 from the Style combo, then nothing happens. In 2.4.3 the previously applied h1 tag would have been removed.

Then after some more testing I see that 2.5 only removes the h1 tag if I only place the cursor somewhere in the text surrounded by the h1 tag and then select the H1 from the Style combo.

Why is it no longer working when selecting the text first, as it was in the 2.4.3?


* 1. * I really, really hopy you can make it so when I'm using FCKeditor in BR mode only using this:

FCKConfig.EnterMode = 'br'; FCKConfig.ShiftEnterMode = 'br';

that the editor will produce no tags at all when clicking Normal in the Format combo!

* 2 * Then I hope you can make the Style combo remove the previously applied tag when:

  • First selecting the text in question
  • And then clicking same tag that was previously applied.

(the way it worked in 2.4.3) Why would I want this? Simply because intuitively when you select some text in order to be able to apply a different Style, then I guess most people would also select the text in order to remove or change the style.

( NOTE: I have noticed that 2.5, regarding this applying and removing tags using Style combo has improved in one way : 2.4.3 produced nested tags of e.g. H tags if you applied another H tag after first applying another. E.g: First applying H1 and then H2 would result in this source:


Which was not nice at all.... 2.5 just replace the previously applied tag whith the last applied one ... THAT IS A GOOD THING... thanks for that. )

* IDEALLY I WOULD LIKE TO BE ABLE TO * output an option both in Style and Format combo that removes the last applied TAG and label it so it is supereasy for enduser to see where to click to get the text back to normal, which in this case is without any tags at all... no P tags either :-)

Anyway, nice work FCKdevelopers, your editor rocks big time. If I can use it in my project, then I will certainly pay for an annual licence. Have done that one time before by the way .....

Change History (5)

comment:1 Changed 16 years ago by Martin Kou

I found problem 2 happens when the selection inside the <Hx> tag is not collapsed. If you simply click inside the <Hx> tag to get a collapsed selection (i.e. a blinking caret), then the <Hx> format can be removed.

Problem 1 has actually been reported in another ticket. But I wasn't able to find it (perhaps it was marked invalid?).

comment:2 Changed 16 years ago by Wojciech Olchawa

Keywords: Confimed added

Partially a DUP of #1540

comment:3 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed added; Confimed removed

comment:4 Changed 16 years ago by Julia

I'm interested in following that post!

comment:5 Changed 13 years ago by Krzysztof Studnik

Component: GeneralCore : Styles
Resolution: worksforme
Status: confirmedclosed

FCKeditor was retired and is no longer supported. All active development was moved to its successor, CKEditor 3.x, that is a fully mature and far superior product. We recommend you upgrade as soon as possible since this issue is no longer a problem in current code base.

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