You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
This commit is contained in:
@@ -43,6 +43,7 @@ const WrappedNoteViewer: React.FC<WrapperProps> = (
|
||||
<NoteBodyViewer
|
||||
themeId={Setting.THEME_LIGHT}
|
||||
style={emptyObject}
|
||||
fontSize={12}
|
||||
noteBody={noteBody}
|
||||
noteMarkupLanguage={MarkupLanguage.Markdown}
|
||||
highlightedKeywords={highlightedKeywords}
|
||||
|
||||
@@ -19,6 +19,7 @@ import { MarkupLanguage } from '@joplin/renderer';
|
||||
interface Props {
|
||||
themeId: number;
|
||||
style: ViewStyle;
|
||||
fontSize: number;
|
||||
noteBody: string;
|
||||
noteMarkupLanguage: MarkupLanguage;
|
||||
highlightedKeywords: string[];
|
||||
@@ -80,6 +81,7 @@ export default function NoteBodyViewer(props: Props) {
|
||||
|
||||
useRerenderHandler({
|
||||
renderer,
|
||||
fontSize: props.fontSize,
|
||||
noteBody: props.noteBody,
|
||||
noteMarkupLanguage: props.noteMarkupLanguage,
|
||||
themeId: props.themeId,
|
||||
|
||||
@@ -25,6 +25,7 @@ interface Props {
|
||||
noteBody: string;
|
||||
noteMarkupLanguage: MarkupLanguage;
|
||||
themeId: number;
|
||||
fontSize: number;
|
||||
|
||||
highlightedKeywords: string[];
|
||||
noteResources: Record<string, ResourceInfo>;
|
||||
@@ -82,7 +83,7 @@ const useRerenderHandler = (props: Props) => {
|
||||
const effectDependencies = [
|
||||
props.noteBody, props.noteMarkupLanguage, props.renderer, props.highlightedKeywords,
|
||||
props.noteHash, props.noteResources, props.themeId, props.paddingBottom, lastResourceLoadCounter,
|
||||
createEditPopupSyntax, destroyEditPopupSyntax, pluginSettingKeys,
|
||||
createEditPopupSyntax, destroyEditPopupSyntax, pluginSettingKeys, props.fontSize,
|
||||
];
|
||||
const previousDeps = usePrevious(effectDependencies, []);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
@@ -149,8 +150,9 @@ const useRerenderHandler = (props: Props) => {
|
||||
theme: JSON.stringify({
|
||||
bodyPaddingTop: '0.8em',
|
||||
bodyPaddingBottom: props.paddingBottom,
|
||||
|
||||
...theme,
|
||||
|
||||
noteViewerFontSize: props.fontSize,
|
||||
}),
|
||||
codeTheme: theme.codeThemeCss,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user