Opened 14 years ago

Closed 13 years ago

#6400 closed Bug (duplicate)

CKEditor cannot manage <strong> or <em> tags when style=color is set.

Reported by: Damian Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.4.1
Keywords: Cc:

Description

It was reported in Drupal site: http://drupal.org/node/929916


Hi all, I did a search but I didn't find anything related, so I'll open a new bug report.

A user, who apparently forgot to use the "paste as plain text" button, inserted a colored bold text using a <strong style="color: rgb(96, 191, 0);"> tag.

CKEditor recognizes it as "bold" text and the relative button is highlighted when the text is selected, but clicking on the button again does not remove the formatting, but adds a couple of tags: </strong><strong style="color: rgb(96, 191, 0);">. I did some experimenting and found that the same applies to <em> tags, and other styles such as "font-style: italic". Interestingly enough, the "Remove format" button does what it's supposed to do. Of course I'll warn my users to use it in case of troubles, but maybe this issue can be avoided just by adding a line or two of code.

Using: CKEditor module 6.x-1.2 with CKEditor 3.4.1 (but problem showed up before I upgraded).

By the way, CKEditor is by far the best editor I've used on a Drupal site, and I tried 'em all (I guess).

Regards

L.F.


I can confirm that bug, it was checked also in demo on CKEditor page.

Change History (2)

comment:1 Changed 13 years ago by Garry Yao

Status: newpending

CKEditor recognizes it as "bold" text and the relative button is highlighted when the text is selected...

That's not true (at least for default style configuration), currently editor just recognize strictly matched styling element.

So with your provided case the bold style should not work.

comment:2 Changed 13 years ago by Wiktor Walc

Resolution: duplicate
Status: pendingclosed

Confirmed, partially. Bold button is selected in the editor, but it is impossible to remove the strong element by pressing the "Bold" button. Same problem with the following source:

<p>
	aa <strong lang="en">bb</strong> cc</p>

It is in fact a duplicate of #6026.

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