Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line height is applied to span element which doesnt work with lower values #2

Open
kujain opened this issue Apr 8, 2016 · 4 comments

Comments

@kujain
Copy link

kujain commented Apr 8, 2016

When we select the content, the parent element (

) is selected and a span element is added within this. However, if a value is selected which is smaller than the default line height value of the

element, it doesn't work. Basically the line-height never goes less than the parent's line height value.

Its probably a css property (inline property cannot have a lower line height than its parent?) but that makes it difficult to provide a dropdown for selecting line heights that are smaller than the current. Unless it can be applied to the parent itself and not a a span.

Please let me know if there's a way around this...thanks!

@vnmone
Copy link

vnmone commented Apr 17, 2017

+1

1 similar comment
@Martin-Eckleben
Copy link

+1

@jonastandinco
Copy link

Any update on this?

@roelzkie15
Copy link

roelzkie15 commented May 10, 2018

Since the editor main tag is a paragraph, it always have a large spaces between another line. If you just simply manage to remove its margin and padding, then the span element with its line-height will just work look right. However a value lower than 18pt still wont work.

To achieve this

'content_css' : './path_to/your/content.css',
/* TinyMCE content.css */
p {
    margin: 0;
    padding: 0;
    border: 0;
}

You can just change the default value of the line-height with options that is equal and higher than 10pt.

tinymce.init({
    ...
    lineheight_formats: "10pt 18pt 20pt 22pt 24pt 26pt 36pt",
    ...
});

It is just a temporary work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants