github.com/ngocphuongnb/tetua@v0.0.7-alpha/packages/editor/src/global.d.ts (about) 1 import { Editor } from '@tiptap/core'; 2 // import high from 'highlight.js/lib/core'; 3 import { TetuaEditor } from '.'; 4 5 type HTMLElementEvent<T extends HTMLElement> = Event & { 6 target: T; 7 } 8 9 declare class MarkdownEditorType extends Editor { 10 getMarkdown(): string; 11 parseMarkdown(input: string): string; 12 } 13 14 declare global { 15 interface Window { 16 editor: TetuaEditor; 17 hljs: any, 18 TetuaEditor: typeof TetuaEditor; 19 } 20 } 21 22 declare module '@tiptap/core' { 23 interface EditorOptions { 24 markdown: any; 25 } 26 }