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

Initializing font size and line height at the same time. #4610

Open
GreenStorm opened this issue Feb 9, 2024 · 4 comments
Open

Initializing font size and line height at the same time. #4610

GreenStorm opened this issue Feb 9, 2024 · 4 comments

Comments

@GreenStorm
Copy link

GreenStorm commented Feb 9, 2024

jsfiddle of issue

https://jsfiddle.net/bt64msr5/3/

Description of your Issue or Request:

Trying to initializing both the font size and line height.

steps to reproduce (Add more if necessary):

  1. Initialize font size and line height.

What is your Operating System, Browser and Version and Summernote Version you are using:

This can help find and resolve any issues, place an x inside the brackets or if relevant elaborate after each choice.

  1. Operating System:
    [x] Microsoft Windows
    [ ] Apple
    [ ] Linux
    [ ] All

  2. Browser and Version:
    [ ] Brave
    [x] Chrome
    [ ] Edge (Old Legacy)
    [ ] Edge (Chromium Based)
    [x] Firefox
    [x] Internet Explorer
    [ ] Opera
    [ ] Safari
    [ ] Other (Specify):

  3. Summernote Type, place an x inside the brackets:
    [ ] BS3
    [ ] BS4
    [ ] Lite
    [x] All

  4. the jisfiddle one is lite 0.8.18

jsfiddle of issue

https://jsfiddle.net/bt64msr5/3/

@DennisSuitters
Copy link
Member

Not sure why you thought you needed to create a fiddle for this issue, words would have sufficed.
That said, I'm not sure why that's not working, I'll mark this as a bug.

@HoffmannTom
Copy link
Contributor

Looking at the settings.js, there isn't any attribute with the name fontSizeUnit or fontSize.
@GreenStorm
Are these two parameters documented somewhere?
Either it is a bug in the documentation or the implementation is missing.

You could solve it by setting the CSS style, e.g.

	<style>
	.note-editable {
		font-size: 50px;
	}
	</style>

@GreenStorm
Copy link
Author

@HoffmannTom

Looking at the settings.js, there isn't any attribute with the name fontSizeUnit or fontSize. @GreenStorm Are these two parameters documented somewhere? Either it is a bug in the documentation or the implementation is missing.

It is documented here: https://summernote.org/deep-dive/#fontsize

and also the $('#summernote').summernote('fontSize', 20); works compared to the other initialization method.

@HoffmannTom
Copy link
Contributor

@GreenStorm
Thanks for the link!
It works as documented.
Having a method to set the fontSize doesn't automatically imply, that you can use the same string as an initialization parameter.
This is not implemented (yet). If the mentioned css-style works for you, then there might be no need to implement this.

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

No branches or pull requests

3 participants