Ticket #4505 (confirmed New Feature)

Opened 5 years ago

Last modified 6 months ago

Merge inline styles into one tag on output HTML

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

Description

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

comment:1 Changed 4 years ago by fredck

  • Milestone changed from CKEditor 3.2 to CKEditor 3.3

comment:2 Changed 4 years ago by garry.yao

  • Milestone changed from CKEditor 3.3 to CKEditor 3.4

comment:3 Changed 4 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 4 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 9 months 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 7 months ago by j.swiderski

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

comment:7 Changed 7 months ago by j.swiderski

Please also have a look at #5980.

comment:8 Changed 6 months 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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy