Opened 11 years ago

Closed 11 years ago

#10861 closed New Feature (duplicate)

Line height toolbar setting

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

Description

Hi, why the line height option is missing in the editor?

It is sometimes required to change line height, specified in content css and there are no way to add line height to the "p" element. This is probably affordable by wrapping the content by a new div, but that's a pain for users.

Is it possible to add a line height button with the next values:

default // remove line-height rule, use defaults
1       // just default m$ word options
1.5
2
[]      // a text field, user could enter any value, e.g 1.2 or 20px

I think this may have same internal problems as #5980 and you will have to mix inline styles?

I think the solution is in changing the way how styles are added to the element now. I noticed when I need bold text it does insert tag "strong", for underline — "u". What if rework this mechanism and always use "span" with inline styles?

So to achieve attached screenshot example, instead of <p><em>Lorem <s><strong>ipsum</strong> <u>dolor</u></s> sit amet.</em></p> do <p><span style="font-style: italic;">Lorem <span style="text-decoration: line-through;"><span style="font-weight: bold">ipsum</span> <span style="text-decoration: underline;">dolor</span></span> sit amet.</span></p>

Having such engine editor will become much more flexible, line height option will be possible, custom user wildcard styles also.

Attachments (1)

Screenshot 594.png (2.3 KB) - added by heaven 11 years ago.
Example formatting

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by heaven

Attachment: Screenshot 594.png added

Example formatting

comment:1 Changed 11 years ago by Jakub Ś

Resolution: duplicate
Status: newclosed

@heaven I understand your ideas but wildcards and line height are two different things. There is no need to mention them in every ticket.

I noticed when I need bold text it does insert tag "strong", for underline — "u". What if rework this mechanism and always use "span" with inline styles?

This is in fact possible. Editor allows you selecting between e.g. strong and span. Please have a look at configuration options e.g. http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-coreStyles_bold.

This ticket is about line-height plugin and it is a duplicate of #8614.

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