You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

  Sunday, 27 June 2021
  4 Replies
  4.4K Visits
Would really appreciate having a button that allows setting line height.
In an Article one may wish to use different line heights to illustrate/emphasise/ style and so on. For instance one sometimes changeds the font size. The options in the button would include default meaning use the height set in the template. It could also use a % (eg 140%) or multiple of line height (eg 1.4) as in regular css.

Colin
more than a month ago
·
#108186
You can set the line height using the Edit Styles dialog (opened from the button with 2 A characters) - https://www.joomlacontenteditor.net/support/documentation/editor/editor-buttons#styles

Other than that, this is best done using classes defined in your template stylesheet, which you would then be able to select and apply from the Styles list. For example, you could use the following:


.line-height-small {
line-height: 0.75em;
}

.line-height-medium {
line-height: 1rem;
}

.line-height-large {
line-height: 1.5rem;
}


etc.

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108189
Ryan thanks for responding but not really the answer!
I can readily change the font size or the text colour of a selected section - so why not the line height in a similar way? The Style Button (AA) does not really provided a 'dynamic' method. And to do such an operation by having to go to the 'code' page is not a real solution. The objective of JCE is to ease the production of text pages It has easy insertion for images, links, tables and so on.
The code page is essential in inserting inline plugins and other specialist uses.

Line height is a regular typographical facility, just as font, font-size, colour and so on. Like other items the range of the line-height would be contained in a <span>...</span>. Appreciate it is not necessarily a simpe task.

Colin
more than a month ago
·
#108191
And to do such an operation by having to go to the 'code' page is not a real solution. The objective of JCE is to ease the production of text pages It has easy insertion for images, links, tables and so on.
The code page is essential in inserting inline plugins and other specialist uses.

My suggestion was to add the styles to your template css file, so the classes would be available in the Styles list in the editor toolbar, to be applied to any text selection or element.

Line height is a regular typographical facility, just as font, font-size, colour and so on. Like other items the range of the line-height would be contained in a <span>...</span>. Appreciate it is not necessarily a simpe task.

It's not that common to change the line-height of a text selection, or even a paragraph. Like font-size, colour etc. these are usually set by the template styling, and to be honest those other font tools (size, color etc.) are only actually left in for legacy reasons. It's a better solution overall to use css classes to set these styles, as they can be modified more easily (by changing the style in the template css file), rather than having the inline styles set differently in each article.

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108192
Still not convinced. Perhaps you have never been in a type setting environment!! I have been a user of JCE for as decade or more and will continue to support the Pro version. Just for interest I surveyed other editors and they do not support line height so you could gain an extra feature here:D

When documenting having the buttons readily available. Your remark
and to be honest those other font tools (size, color etc.) are only actually left in for legacy reasons
would, if implemented, be a great detriment to JCE.

With development pressures one cannot always be good enough to forsee all the needs of documents and provide an increasingly large set of 'off the shelf ' styles.
using line height between sections if List elements is solved by
<li style="border-bottom: 8px solid transparent;"> rather than by a <br /><br />.

I am also one of the developers of jDownloads and write all the documentation (Arno is the code guru!). As a result I have multiple websites, mostly XAMPP test sites, so I guess I will have to become more more proficient and strict in export and import of JCE profiles and the custom CSS.

But if you do not like the idea I will continue to suffer!

Best wishes
Colin
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!