mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
a616dc3cd2
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
27 lines
654 B
TypeScript
27 lines
654 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,
|
|
autocompleteMarkup: true,
|
|
|
|
keymap: EditorKeymap.Default,
|
|
language: EditorLanguageType.Markdown,
|
|
themeData,
|
|
|
|
indentWithTabs: true,
|
|
editorLabel: 'Markdown editor',
|
|
};
|
|
|
|
return editorSettings;
|
|
};
|
|
|
|
export default createEditorSettings;
|