You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			514 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			514 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import Setting from '@joplin/lib/models/Setting';
 | |
| import createEditor from '../createEditor';
 | |
| import createEditorSettings from '../../testing/createEditorSettings';
 | |
| 
 | |
| const createEditorControl = (initialText: string) => {
 | |
| 	const editorSettings = createEditorSettings(Setting.THEME_LIGHT);
 | |
| 
 | |
| 	return createEditor(document.body, {
 | |
| 		initialText,
 | |
| 		initialNoteId: '',
 | |
| 		settings: editorSettings,
 | |
| 		onEvent: _event => {},
 | |
| 		onLogMessage: _message => {},
 | |
| 		onPasteFile: null,
 | |
| 	});
 | |
| };
 | |
| 
 | |
| export default createEditorControl;
 |