mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
This commit is contained in:
parent
310a90744a
commit
85d98f5254
@ -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',
|
||||
|
@ -464,6 +464,7 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
noteToolbarButtonInfos: props.toolbarButtonInfos,
|
||||
plugins: props.plugins,
|
||||
fontSize: Setting.value('style.editor.fontSize'),
|
||||
fontFamily: Setting.value('style.editor.fontFamily'),
|
||||
contentMaxWidth: props.contentMaxWidth,
|
||||
isSafeMode: props.isSafeMode,
|
||||
useCustomPdfViewer: props.useCustomPdfViewer,
|
||||
|
@ -118,6 +118,7 @@ export interface NoteBodyEditorProps {
|
||||
noteToolbarButtonInfos: ToolbarButtonInfo[];
|
||||
plugins: PluginStates;
|
||||
fontSize: number;
|
||||
fontFamily: string;
|
||||
contentMaxWidth: number;
|
||||
isSafeMode: boolean;
|
||||
noteId: string;
|
||||
|
Loading…
Reference in New Issue
Block a user