Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up line-height via TinyMCE

Is there a way to give user possibility to easily changing line-height attribute of paragraph in tinyMCE editor? Something like its native "Font size" or "Format" <select> or anything else. I know I can use "edit CSS" functionality and set it up there. I'm looking for something more user-friendly.

I can't find it anywhere.

like image 814
avall Avatar asked Jul 21 '12 20:07

avall


People also ask

How do you make TinyMCE responsive?

The TinyMCE editor can be made responsive by using css media queries. Simply add css rules that set the width property of table. mceLayout and the tinyMCE textareas. You will need to enforce these css rules using !

What is default line height?

The default line height in most browsers is about 110% to 120%. This is a paragraph with a smaller line-height. This is a paragraph with a smaller line-height. This is a paragraph with a bigger line-height.

How do I resize TinyMCE?

Clicking and dragging the resize handle in the bottom right-hand corner of the editor.


2 Answers

I found this PlugIn for TinyMCE version 4.1.5 (2014-09-09)

https://github.com/castler/tinymce-line-height-plugin

Setting up like this:

tinymce.init({
    plugins: 'lineheight',
    toolbar: 'lineheightselect' 
});

Also you could configure the different heights like that:

tinymce.init({
    lineheight_formats: "8pt 9pt 10pt 11pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 26pt 36pt",
});

I tested this and it works great.

like image 156
VZimmerl Avatar answered Sep 28 '22 05:09

VZimmerl


As per my comment,

Someone else was experiencing an issue similar to yours and a member of the TinyMCE forums provided a solution:

http://www.tinymce.com/forum/viewtopic.php?id=28774

like image 35
Gavin Avatar answered Sep 28 '22 04:09

Gavin