froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.3k stars 675 forks source link

can't change default font size #3691

Open tisdall opened 5 years ago

tisdall commented 5 years ago

The following help document seems to be wrong: https://wysiwyg-editor.froala.help/hc/en-us/articles/115000817105-How-can-I-set-a-default-font-style-

There's CSS styling that explicitly sets the font-size to 14px and binds closer then .fr-view: So, setting a style on .fr-view will work on the displayed content, but not in the editor due to the following:

https://github.com/froala/wysiwyg-editor/blob/v3.0.5/css/froala_editor.css#L36

.fr-box.fr-basic .fr-element {
  font-size: 14px;
}
casualuser commented 4 years ago

Hello,

Please try extended css paths like this:

.fr-box.fr-basic .fr-element.fr-view {
  font-family: "Times New Roman", Georgia, Serif;
  font-size: 18px;
  color: #444444;
}

We also updated that help article - https://wysiwyg-editor.froala.help/hc/en-us/articles/115000817105-How-can-I-set-a-default-font-style-

jondavidpass commented 3 years ago

Also experiencing the same issue even with a more specific selector. Also setting fontSizeDefaultSelection which doesn't appear to make any difference either.