mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	chore(ckeditor5-footnotes): initialize empty plugin
This commit is contained in:
		
							
								
								
									
										113
									
								
								packages/ckeditor5-footnotes/sample/ckeditor.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										113
									
								
								packages/ckeditor5-footnotes/sample/ckeditor.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,113 @@ | ||||
| declare global { | ||||
| 	interface Window { | ||||
| 		editor: ClassicEditor; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| import { | ||||
| 	ClassicEditor, | ||||
| 	Autoformat, | ||||
| 	Base64UploadAdapter, | ||||
| 	BlockQuote, | ||||
| 	Bold, | ||||
| 	Code, | ||||
| 	CodeBlock, | ||||
| 	Essentials, | ||||
| 	Heading, | ||||
| 	Image, | ||||
| 	ImageCaption, | ||||
| 	ImageStyle, | ||||
| 	ImageToolbar, | ||||
| 	ImageUpload, | ||||
| 	Indent, | ||||
| 	Italic, | ||||
| 	Link, | ||||
| 	List, | ||||
| 	MediaEmbed, | ||||
| 	Paragraph, | ||||
| 	Table, | ||||
| 	TableToolbar | ||||
| } from 'ckeditor5'; | ||||
|  | ||||
| import CKEditorInspector from '@ckeditor/ckeditor5-inspector'; | ||||
|  | ||||
| import Footnotes from '../src/footnotes.js'; | ||||
|  | ||||
| import 'ckeditor5/ckeditor5.css'; | ||||
|  | ||||
| ClassicEditor | ||||
| 	.create( document.getElementById( 'editor' )!, { | ||||
| 		licenseKey: 'GPL', | ||||
| 		plugins: [ | ||||
| 			Footnotes, | ||||
| 			Essentials, | ||||
| 			Autoformat, | ||||
| 			BlockQuote, | ||||
| 			Bold, | ||||
| 			Heading, | ||||
| 			Image, | ||||
| 			ImageCaption, | ||||
| 			ImageStyle, | ||||
| 			ImageToolbar, | ||||
| 			ImageUpload, | ||||
| 			Indent, | ||||
| 			Italic, | ||||
| 			Link, | ||||
| 			List, | ||||
| 			MediaEmbed, | ||||
| 			Paragraph, | ||||
| 			Table, | ||||
| 			TableToolbar, | ||||
| 			CodeBlock, | ||||
| 			Code, | ||||
| 			Base64UploadAdapter | ||||
| 		], | ||||
| 		toolbar: [ | ||||
| 			'undo', | ||||
| 			'redo', | ||||
| 			'|', | ||||
| 			'footnotes', | ||||
| 			'|', | ||||
| 			'heading', | ||||
| 			'|', | ||||
| 			'bold', | ||||
| 			'italic', | ||||
| 			'link', | ||||
| 			'code', | ||||
| 			'bulletedList', | ||||
| 			'numberedList', | ||||
| 			'|', | ||||
| 			'outdent', | ||||
| 			'indent', | ||||
| 			'|', | ||||
| 			'uploadImage', | ||||
| 			'blockQuote', | ||||
| 			'insertTable', | ||||
| 			'mediaEmbed', | ||||
| 			'codeBlock' | ||||
| 		], | ||||
| 		image: { | ||||
| 			toolbar: [ | ||||
| 				'imageStyle:inline', | ||||
| 				'imageStyle:block', | ||||
| 				'imageStyle:side', | ||||
| 				'|', | ||||
| 				'imageTextAlternative' | ||||
| 			] | ||||
| 		}, | ||||
| 		table: { | ||||
| 			contentToolbar: [ | ||||
| 				'tableColumn', | ||||
| 				'tableRow', | ||||
| 				'mergeTableCells' | ||||
| 			] | ||||
| 		} | ||||
| 	} ) | ||||
| 	.then( editor => { | ||||
| 		window.editor = editor; | ||||
| 		CKEditorInspector.attach( editor ); | ||||
| 		window.console.log( 'CKEditor 5 is ready.', editor ); | ||||
| 	} ) | ||||
| 	.catch( err => { | ||||
| 		window.console.error( err.stack ); | ||||
| 	} ); | ||||
		Reference in New Issue
	
	Block a user