mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
parent
322641ccd6
commit
c90865c4d2
@ -25,9 +25,11 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number,
|
|||||||
const [resourceLoadedTime, setResourceLoadedTime] = useState(0);
|
const [resourceLoadedTime, setResourceLoadedTime] = useState(0);
|
||||||
const [isFirstRender, setIsFirstRender] = useState(true);
|
const [isFirstRender, setIsFirstRender] = useState(true);
|
||||||
|
|
||||||
|
const paddingTop = '.8em';
|
||||||
|
|
||||||
const rendererTheme = useMemo(() => {
|
const rendererTheme = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
bodyPaddingTop: '.8em', // Extra top padding on the rendered MD so it doesn't touch the border
|
bodyPaddingTop: paddingTop, // Extra top padding on the rendered MD so it doesn't touch the border
|
||||||
bodyPaddingBottom: paddingBottom, // Extra bottom padding to make it possible to scroll past the action button (so that it doesn't overlap the text)
|
bodyPaddingBottom: paddingBottom, // Extra bottom padding to make it possible to scroll past the action button (so that it doesn't overlap the text)
|
||||||
...themeStyle(themeId),
|
...themeStyle(themeId),
|
||||||
};
|
};
|
||||||
@ -152,8 +154,14 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number,
|
|||||||
*/
|
*/
|
||||||
body > #rendered-md {
|
body > #rendered-md {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
height: calc(100vh - ${paddingBottom}px - ${paddingTop});
|
||||||
|
padding-bottom: ${paddingBottom}px;
|
||||||
|
padding-top: ${paddingTop};
|
||||||
|
}
|
||||||
|
|
||||||
|
:root > body {
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user