Opened 8 years ago

Last modified 4 years ago

#4505 confirmed New Feature

Merge inline styles into one tag on output HTML

Reported by: garry.yao Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version:
Keywords: Cc:


Sometimes inline styles based on the same tag could be further optimized by combining them into one, i.e.

// font color + font size
<span style="font-size: 16px"><span style="color: #000000">This is my text.</span></span>

Could be output as

<span style="font-size: 16px;color: #000000">This is my text.</span>

Finally, this function should be configurable.

Change History (7)

comment:1 Changed 7 years ago by fredck

  • Milestone changed from CKEditor 3.2 to CKEditor 3.3

comment:2 Changed 7 years ago by garry.yao

  • Milestone changed from CKEditor 3.3 to CKEditor 3.4

comment:3 Changed 7 years ago by garry.yao

  • Keywords Pending added
  • Milestone CKEditor 3.4 deleted

We need to understand the necessity of this feature, do we have a strong request behind this? And when considering implementation, it's mostly only applicable on <span> but we have to employee a catch-all filter for doing that.

comment:4 Changed 7 years ago by fredck

  • Keywords Confirmed added; Pending removed

The most important reason for this is to have a more compact output from the editor. It's a valid request, but there is no priority for it.

comment:5 Changed 4 years ago by j.swiderski

This ticket plus #10675 is one large issue to change how styles are working.

#5503 is part of this ticket. It has been reported many times thus is has its own separate ticket.

comment:6 Changed 4 years ago by j.swiderski

Other issues can be found in #10742, #10675, #10824, #5980 #11120.

Last edited 2 years ago by j.swiderski (previous) (diff)

comment:8 Changed 4 years ago by j.swiderski

Ticket #6977 describes certain special case.

Not really sure if it should be applied here or not but perhaps should be also applied when font and span tags are used.

Additionally this case also mentions CSS rules that perhaps should also be merged background-color: rgb(130, 130, 130); and background-color:#ff0000;

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy