1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop: Fixes #10036: Applied font family and font size to RTE (#10102)

This commit is contained in:
Abdelrrahman Elhaddad
2024-03-15 11:30:45 +02:00
committed by GitHub
parent 310a90744a
commit 85d98f5254
3 changed files with 5 additions and 0 deletions

View File

@@ -565,6 +565,8 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
useEffect(() => {
if (!scriptLoaded) return;
const theme = themeStyle(props.themeId);
const loadEditor = async () => {
const language = closestSupportedLocale(props.locale, true, supportedLocales);
@@ -598,6 +600,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
];
const editors = await (window as any).tinymce.init({
content_style: `* {font-size: ${props.fontSize}px; font-family: "${props.fontFamily}"; line-height: ${theme.lineHeight};}`,
selector: `#${rootIdRef.current}`,
width: '100%',
body_class: 'jop-tinymce',