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

Froala 4.2.1: font-family is set to undefined #4795

Open
dcsaszar opened this issue Jun 15, 2024 · 0 comments
Open

Froala 4.2.1: font-family is set to undefined #4795

dcsaszar opened this issue Jun 15, 2024 · 0 comments

Comments

@dcsaszar
Copy link

dcsaszar commented Jun 15, 2024

Froala 4.2.1 overwrites the font-family defined by the container (both iframe and inline editors).
It also tries to overwrite the font-size but luckily fails b/c of invalid CSS.

After checking the code: As a workaround, these options can be set:

{
  fontFamilyDefaultSelection: "Font Family",
  fontSizeDefaultSelection: "Font Size",
}
Expected behavior.

Element, body, descendants font-family (and font-size) styles are respected/inherited.

Actual behavior.
{  font-size: undefinedundefined !important; font-family: undefined !important; }
Steps to reproduce the problem.

https://codepen.io/dcsaszar/pen/OJYzyBw

body {
  font-family: cursive;
}
<div id="froala">Foo</div>
import * as FroalaEditor from "froala-editor";

const element = document.getElementById("froala");
new FroalaEditor(element, { toolbarInline: true });
Editor version.

4.2.1

(it works as expected up to 4.2.0)

OS.

macOS 14.5 (23F79)

Browser.

Chrome 125.0.6422.142

Recording.
image
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

1 participant