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(() => {
|
useEffect(() => {
|
||||||
if (!scriptLoaded) return;
|
if (!scriptLoaded) return;
|
||||||
|
|
||||||
|
const theme = themeStyle(props.themeId);
|
||||||
|
|
||||||
const loadEditor = async () => {
|
const loadEditor = async () => {
|
||||||
const language = closestSupportedLocale(props.locale, true, supportedLocales);
|
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({
|
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}`,
|
selector: `#${rootIdRef.current}`,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
body_class: 'jop-tinymce',
|
body_class: 'jop-tinymce',
|
||||||
|
@ -464,6 +464,7 @@ function NoteEditor(props: NoteEditorProps) {
|
|||||||
noteToolbarButtonInfos: props.toolbarButtonInfos,
|
noteToolbarButtonInfos: props.toolbarButtonInfos,
|
||||||
plugins: props.plugins,
|
plugins: props.plugins,
|
||||||
fontSize: Setting.value('style.editor.fontSize'),
|
fontSize: Setting.value('style.editor.fontSize'),
|
||||||
|
fontFamily: Setting.value('style.editor.fontFamily'),
|
||||||
contentMaxWidth: props.contentMaxWidth,
|
contentMaxWidth: props.contentMaxWidth,
|
||||||
isSafeMode: props.isSafeMode,
|
isSafeMode: props.isSafeMode,
|
||||||
useCustomPdfViewer: props.useCustomPdfViewer,
|
useCustomPdfViewer: props.useCustomPdfViewer,
|
||||||
|
@ -118,6 +118,7 @@ export interface NoteBodyEditorProps {
|
|||||||
noteToolbarButtonInfos: ToolbarButtonInfo[];
|
noteToolbarButtonInfos: ToolbarButtonInfo[];
|
||||||
plugins: PluginStates;
|
plugins: PluginStates;
|
||||||
fontSize: number;
|
fontSize: number;
|
||||||
|
fontFamily: string;
|
||||||
contentMaxWidth: number;
|
contentMaxWidth: number;
|
||||||
isSafeMode: boolean;
|
isSafeMode: boolean;
|
||||||
noteId: string;
|
noteId: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user