1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00
Files
joplin/packages/app-mobile/components/NoteEditor/testing/createTestEditorProps.ts
2025-07-29 20:25:43 +01:00

25 lines
800 B
TypeScript

import * as React from 'react';
import createEditorSettings from '@joplin/editor/testing/createEditorSettings';
import { EditorProps } from '../types';
import Setting from '@joplin/lib/models/Setting';
const defaultEditorSettings = { ...createEditorSettings(Setting.THEME_LIGHT), themeId: Setting.THEME_LIGHT };
const defaultWrapperProps: EditorProps = {
noteResources: {},
webviewRef: React.createRef(),
editorRef: React.createRef(),
themeId: Setting.THEME_LIGHT,
noteHash: '',
noteId: '',
initialText: '',
editorSettings: defaultEditorSettings,
initialSelection: { start: 0, end: 0 },
globalSearch: '',
plugins: {},
onAttach: () => Promise.resolve(),
onEditorEvent: () => {},
};
const createTestEditorProps = () => ({ ...defaultWrapperProps });
export default createTestEditorProps;