mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
25 lines
592 B
TypeScript
25 lines
592 B
TypeScript
import { themeStyle } from '@joplin/lib/theme';
|
|
import { EditorKeymap, EditorLanguageType, EditorSettings } from '../../types';
|
|
|
|
const createEditorSettings = (themeId: number) => {
|
|
const themeData = themeStyle(themeId);
|
|
const editorSettings: EditorSettings = {
|
|
katexEnabled: true,
|
|
spellcheckEnabled: true,
|
|
useExternalSearch: true,
|
|
readOnly: false,
|
|
automatchBraces: false,
|
|
ignoreModifiers: false,
|
|
|
|
keymap: EditorKeymap.Default,
|
|
language: EditorLanguageType.Markdown,
|
|
themeData,
|
|
|
|
indentWithTabs: true,
|
|
};
|
|
|
|
return editorSettings;
|
|
};
|
|
|
|
export default createEditorSettings;
|