mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 02:59:03 +01:00 
			
		
		
		
	feat(editor): rewrite <s> to <del>
This commit is contained in:
		
							parent
							
								
									fceee44844
								
							
						
					
					
						commit
						1a1cb3d60b
					
				| @ -78,6 +78,7 @@ import '../../ckeditor5-footnotes/src/footnote.css'; | ||||
| import { Footnotes } from '../../ckeditor5-footnotes'; | ||||
| import Kbd from "../../ckeditor5-keyboard-marker/src/Kbd"; | ||||
| import { Admonition } from "../../ckeditor5-admonition"; | ||||
| import StrikethroughAsDel from './strikethrough_as_del'; | ||||
| 
 | ||||
| export const COMMON_PLUGINS = [ | ||||
| 	// essentials package expanded to allow selectively disable Enter and ShiftEnter
 | ||||
| @ -136,6 +137,7 @@ export const COMMON_PLUGINS = [ | ||||
| 	Mention, | ||||
| 	InternalLinkPlugin, | ||||
| 	ItalicAsEmPlugin, | ||||
| 	StrikethroughAsDel, | ||||
| 	MarkdownImportPlugin, | ||||
| 	CuttonotePlugin, | ||||
| 	MentionCustomization, | ||||
|  | ||||
							
								
								
									
										15
									
								
								packages/ckeditor5-build-trilium/src/strikethrough_as_del.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								packages/ckeditor5-build-trilium/src/strikethrough_as_del.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||||
| 
 | ||||
| export default class StrikethroughAsDel extends Plugin { | ||||
| 
 | ||||
| 	init() { | ||||
| 		this.editor.conversion | ||||
| 			.for("downcast") | ||||
| 			.attributeToElement({ | ||||
| 				model: "strikethrough", | ||||
| 				view: "del", | ||||
| 				converterPriority: "high" | ||||
| 			}); | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran