mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
b7f5f848f2
Will also allow using them when exporting HTML or PDF from CLI.
61 lines
1.3 KiB
TypeScript
61 lines
1.3 KiB
TypeScript
import { NoteBodyEditorProps } from '../../../utils/types';
|
|
const { buildStyle } = require('lib/theme');
|
|
|
|
export default function styles(props: NoteBodyEditorProps) {
|
|
return buildStyle('AceEditor', props.theme, (theme: any) => {
|
|
return {
|
|
root: {
|
|
position: 'relative',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
...props.style,
|
|
},
|
|
rowToolbar: {
|
|
position: 'relative',
|
|
display: 'flex',
|
|
flexDirection: 'row',
|
|
},
|
|
rowEditorViewer: {
|
|
position: 'relative',
|
|
display: 'flex',
|
|
flexDirection: 'row',
|
|
flex: 1,
|
|
paddingTop: 10,
|
|
},
|
|
cellEditor: {
|
|
position: 'relative',
|
|
display: 'flex',
|
|
flex: 1,
|
|
},
|
|
cellViewer: {
|
|
position: 'relative',
|
|
display: 'flex',
|
|
flex: 1,
|
|
borderLeftWidth: 1,
|
|
borderLeftColor: theme.dividerColor,
|
|
borderLeftStyle: 'solid',
|
|
},
|
|
viewer: {
|
|
display: 'flex',
|
|
overflow: 'hidden',
|
|
verticalAlign: 'top',
|
|
boxSizing: 'border-box',
|
|
width: '100%',
|
|
},
|
|
editor: {
|
|
display: 'flex',
|
|
width: 'auto',
|
|
height: 'auto',
|
|
flex: 1,
|
|
overflowY: 'hidden',
|
|
paddingTop: 0,
|
|
lineHeight: `${theme.textAreaLineHeight}px`,
|
|
fontSize: `${theme.editorFontSize}px`,
|
|
color: theme.color,
|
|
backgroundColor: theme.backgroundColor,
|
|
aceEditorTheme: theme.aceEditorTheme, // Defined in theme.js
|
|
},
|
|
};
|
|
});
|
|
}
|