mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	fix(client/ts): load only needed CodeMirror plugins
This commit is contained in:
		
							parent
							
								
									69a6739d1f
								
							
						
					
					
						commit
						e7f5d1d280
					
				| @ -32,7 +32,7 @@ const CODE_MIRROR: Library = { | |||||||
| 
 | 
 | ||||||
|         const mimeTypes = mimeTypesService.getMimeTypes(); |         const mimeTypes = mimeTypesService.getMimeTypes(); | ||||||
|         for (const mimeType of mimeTypes) { |         for (const mimeType of mimeTypes) { | ||||||
|             if (mimeType.codeMirrorSource) { |             if (mimeType.enabled && mimeType.codeMirrorSource) { | ||||||
|                 scriptsToLoad.push(mimeType.codeMirrorSource); |                 scriptsToLoad.push(mimeType.codeMirrorSource); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -2,6 +2,9 @@ import { MIME_TYPE_AUTO, MIME_TYPES_DICT, normalizeMimeTypeForCKEditor, type Mim | |||||||
| import options from "./options.js"; | import options from "./options.js"; | ||||||
| 
 | 
 | ||||||
| interface MimeType extends MimeTypeDefinition { | interface MimeType extends MimeTypeDefinition { | ||||||
|  |     /** | ||||||
|  |      * True if this mime type was enabled by the user in the "Available MIME types in the dropdown" option in the Code Notes settings. | ||||||
|  |      */ | ||||||
|     enabled: boolean; |     enabled: boolean; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran