fix: add GFM Tables, Strikeout, task list
This commit is contained in:
		
							parent
							
								
									098237b012
								
							
						
					
					
						commit
						d1fc7ec939
					
				
							
								
								
									
										7
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -86,6 +86,7 @@ declare module '@vue/runtime-core' { | ||||
|     HmacGenerator: typeof import('./src/tools/hmac-generator/hmac-generator.vue')['default'] | ||||
|     'Home.page': typeof import('./src/pages/Home.page.vue')['default'] | ||||
|     HtmlEntities: typeof import('./src/tools/html-entities/html-entities.vue')['default'] | ||||
|     HtmlToMarkdown: typeof import('./src/tools/html-to-markdown/html-to-markdown.vue')['default'] | ||||
|     HtmlWysiwygEditor: typeof import('./src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue')['default'] | ||||
|     HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default'] | ||||
|     IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default'] | ||||
| @ -130,23 +131,19 @@ declare module '@vue/runtime-core' { | ||||
|     MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default'] | ||||
|     MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default'] | ||||
|     NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default'] | ||||
|     NButton: typeof import('naive-ui')['NButton'] | ||||
|     NCode: typeof import('naive-ui')['NCode'] | ||||
|     NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] | ||||
|     NConfigProvider: typeof import('naive-ui')['NConfigProvider'] | ||||
|     NDivider: typeof import('naive-ui')['NDivider'] | ||||
|     NEllipsis: typeof import('naive-ui')['NEllipsis'] | ||||
|     NForm: typeof import('naive-ui')['NForm'] | ||||
|     NFormItem: typeof import('naive-ui')['NFormItem'] | ||||
|     NH1: typeof import('naive-ui')['NH1'] | ||||
|     NH3: typeof import('naive-ui')['NH3'] | ||||
|     NIcon: typeof import('naive-ui')['NIcon'] | ||||
|     NInputNumber: typeof import('naive-ui')['NInputNumber'] | ||||
|     NLayout: typeof import('naive-ui')['NLayout'] | ||||
|     NLayoutSider: typeof import('naive-ui')['NLayoutSider'] | ||||
|     NMenu: typeof import('naive-ui')['NMenu'] | ||||
|     NScrollbar: typeof import('naive-ui')['NScrollbar'] | ||||
|     NSlider: typeof import('naive-ui')['NSlider'] | ||||
|     NSwitch: typeof import('naive-ui')['NSwitch'] | ||||
|     NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default'] | ||||
|     OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default'] | ||||
|     PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default'] | ||||
|  | ||||
| @ -35,15 +35,16 @@ | ||||
|     "release": "node ./scripts/release.mjs" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@guyplusplus/turndown-plugin-gfm": "^1.0.7", | ||||
|     "@it-tools/bip39": "^0.0.4", | ||||
|     "@it-tools/oggen": "^1.3.0", | ||||
|     "@sindresorhus/slugify": "^2.2.1", | ||||
|     "@tiptap/pm": "2.1.6", | ||||
|     "@tiptap/starter-kit": "2.1.6", | ||||
|     "@tiptap/vue-3": "2.0.3", | ||||
|     "@types/turndown": "^5.0.4", | ||||
|     "@types/markdown-it": "^13.0.7", | ||||
|     "@types/figlet": "^1.5.8", | ||||
|     "@types/markdown-it": "^13.0.7", | ||||
|     "@types/turndown": "^5.0.4", | ||||
|     "@vicons/material": "^0.12.0", | ||||
|     "@vicons/tabler": "^0.12.0", | ||||
|     "@vueuse/core": "^10.3.0", | ||||
|  | ||||
							
								
								
									
										21
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										21
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -5,6 +5,9 @@ settings: | ||||
|   excludeLinksFromLockfile: false | ||||
| 
 | ||||
| dependencies: | ||||
|   '@guyplusplus/turndown-plugin-gfm': | ||||
|     specifier: ^1.0.7 | ||||
|     version: 1.0.7 | ||||
|   '@it-tools/bip39': | ||||
|     specifier: ^0.0.4 | ||||
|     version: 0.0.4 | ||||
| @ -26,12 +29,12 @@ dependencies: | ||||
|   '@types/figlet': | ||||
|     specifier: ^1.5.8 | ||||
|     version: 1.5.8 | ||||
|   '@types/turndown': | ||||
|     specifier: ^5.0.4 | ||||
|     version: 5.0.5 | ||||
|   '@types/markdown-it': | ||||
|     specifier: ^13.0.7 | ||||
|     version: 13.0.9 | ||||
|   '@types/turndown': | ||||
|     specifier: ^5.0.4 | ||||
|     version: 5.0.5 | ||||
|   '@vicons/material': | ||||
|     specifier: ^0.12.0 | ||||
|     version: 0.12.0 | ||||
| @ -2171,6 +2174,12 @@ packages: | ||||
|     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} | ||||
|     dev: true | ||||
| 
 | ||||
|   /@guyplusplus/turndown-plugin-gfm@1.0.7: | ||||
|     resolution: {integrity: sha512-k2KATk491JIeq1KNsjOwaD88cdknQeTpKVXh9OuZfHdjFuSEtEVVDCfCbxzmRvJxeKDPbZQl8DGP5o7SaIvWBw==} | ||||
|     dependencies: | ||||
|       turndown: 7.2.0 | ||||
|     dev: false | ||||
| 
 | ||||
|   /@humanwhocodes/config-array@0.11.10: | ||||
|     resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} | ||||
|     engines: {node: '>=10.10.0'} | ||||
| @ -3385,7 +3394,7 @@ packages: | ||||
|     dependencies: | ||||
|       '@unhead/dom': 0.5.1 | ||||
|       '@unhead/schema': 0.5.1 | ||||
|       '@vueuse/shared': 11.0.3(vue@3.3.4) | ||||
|       '@vueuse/shared': 11.1.0(vue@3.3.4) | ||||
|       unhead: 0.5.1 | ||||
|       vue: 3.3.4 | ||||
|     transitivePeerDependencies: | ||||
| @ -4027,8 +4036,8 @@ packages: | ||||
|       - vue | ||||
|     dev: false | ||||
| 
 | ||||
|   /@vueuse/shared@11.0.3(vue@3.3.4): | ||||
|     resolution: {integrity: sha512-0rY2m6HS5t27n/Vp5cTDsKTlNnimCqsbh/fmT2LgE+aaU42EMfXo8+bNX91W9I7DDmxfuACXMmrd7d79JxkqWA==} | ||||
|   /@vueuse/shared@11.1.0(vue@3.3.4): | ||||
|     resolution: {integrity: sha512-YUtIpY122q7osj+zsNMFAfMTubGz0sn5QzE5gPzAIiCmtt2ha3uQUY1+JPyL4gRCTsLPX82Y9brNbo/aqlA91w==} | ||||
|     dependencies: | ||||
|       vue-demi: 0.14.10(vue@3.3.4) | ||||
|     transitivePeerDependencies: | ||||
|  | ||||
| @ -1,12 +1,19 @@ | ||||
| <script setup lang="ts"> | ||||
| import TurndownService from 'turndown'; | ||||
| import { gfm as addGFM } from '@guyplusplus/turndown-plugin-gfm'; | ||||
| import TextareaCopyable from '@/components/TextareaCopyable.vue'; | ||||
| 
 | ||||
| const turndownService = new TurndownService(); | ||||
| addGFM(turndownService); | ||||
| 
 | ||||
| const inputHtml = ref(''); | ||||
| const outputMarkdown = computed(() => { | ||||
|   return turndownService.turndown(inputHtml.value ?? ''); | ||||
|   try { | ||||
|     return turndownService.turndown(inputHtml.value ?? ''); | ||||
|   } | ||||
|   catch (e: any) { | ||||
|     return e.toString(); | ||||
|   } | ||||
| }); | ||||
| </script> | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										3
									
								
								src/tools/html-to-markdown/turndown-plugin-gfm.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/tools/html-to-markdown/turndown-plugin-gfm.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| declare module '@guyplusplus/turndown-plugin-gfm' { | ||||
|     export function gfm(turndown: any); | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user