2021-11-17 21:40:07 +02:00
|
|
|
import { ThemeAppearance } from '@joplin/lib/themes/type';
|
2020-09-15 15:01:07 +02:00
|
|
|
import { NoteBodyEditorProps } from '../../../utils/types';
|
2020-11-07 17:59:37 +02:00
|
|
|
const { buildStyle } = require('@joplin/lib/theme');
|
2020-09-15 15:01:07 +02:00
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
export default function styles(props: NoteBodyEditorProps) {
|
|
|
|
return buildStyle(['TinyMCE', props.style.width, props.style.height], props.themeId, (theme: any) => {
|
2020-09-15 15:01:07 +02:00
|
|
|
const extraToolbarContainer = {
|
2020-11-19 14:34:49 +02:00
|
|
|
boxSizing: 'content-box',
|
2020-09-15 15:01:07 +02:00
|
|
|
backgroundColor: theme.backgroundColor3,
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'row',
|
|
|
|
position: 'absolute',
|
|
|
|
height: theme.toolbarHeight,
|
|
|
|
zIndex: 2,
|
|
|
|
top: 0,
|
|
|
|
padding: theme.toolbarPadding,
|
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
disabledOverlay: {
|
|
|
|
zIndex: 10,
|
|
|
|
position: 'absolute',
|
2021-11-17 21:40:07 +02:00
|
|
|
backgroundColor: theme.backgroundColor,
|
|
|
|
opacity: theme.appearance === ThemeAppearance.Light ? 0.7 : 0.9,
|
2020-09-15 15:01:07 +02:00
|
|
|
height: '100%',
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'column',
|
|
|
|
alignItems: 'center',
|
|
|
|
padding: 20,
|
|
|
|
paddingTop: 50,
|
|
|
|
textAlign: 'center',
|
|
|
|
width: '100%',
|
|
|
|
},
|
|
|
|
rootStyle: {
|
|
|
|
position: 'relative',
|
|
|
|
width: props.style.width,
|
|
|
|
height: props.style.height,
|
|
|
|
},
|
|
|
|
leftExtraToolbarContainer: {
|
|
|
|
...extraToolbarContainer,
|
|
|
|
width: 80,
|
|
|
|
left: 0,
|
|
|
|
},
|
|
|
|
rightExtraToolbarContainer: {
|
|
|
|
...extraToolbarContainer,
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'flex-end',
|
|
|
|
width: 70,
|
|
|
|
right: 0,
|
|
|
|
paddingRight: theme.mainPadding,
|
|
|
|
},
|
|
|
|
extraToolbarButton: {
|
|
|
|
display: 'flex',
|
|
|
|
border: 'none',
|
|
|
|
background: 'none',
|
|
|
|
},
|
|
|
|
extraToolbarButtonIcon: {
|
|
|
|
fontSize: theme.toolbarIconSize,
|
|
|
|
color: theme.color3,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|