mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 23:54:28 -06:00
Auto-format of types
folder.
This commit is contained in:
parent
df530cf465
commit
c1a695af51
@ -1,14 +1,16 @@
|
||||
// Create new instance
|
||||
const editor = new EasyMDE({
|
||||
autoDownloadFontAwesome: false,
|
||||
element: document.getElementById("mdEditor")!,
|
||||
hideIcons: ["side-by-side", "fullscreen"],
|
||||
element: document.getElementById('mdEditor')!,
|
||||
hideIcons: ['side-by-side', 'fullscreen'],
|
||||
shortcuts: {
|
||||
drawTable: "Cmd-Alt-T",
|
||||
drawTable: 'Cmd-Alt-T',
|
||||
toggleFullScreen: null
|
||||
},
|
||||
spellChecker: false,
|
||||
onToggleFullScreen: (full: boolean) => { console.log('FullscreenToggled', full); },
|
||||
onToggleFullScreen: (full: boolean) => {
|
||||
console.log('FullscreenToggled', full);
|
||||
},
|
||||
theme: 'someOtherTheme',
|
||||
});
|
||||
|
||||
@ -23,4 +25,6 @@ const fullscreen = editor.isFullscreenActive() as boolean;
|
||||
editor.codemirror.setOption('readOnly', true);
|
||||
|
||||
// Static properties
|
||||
EasyMDE.toggleItalic = (editor: EasyMDE) => { console.log('SomeButtonOverride'); };
|
||||
EasyMDE.toggleItalic = (editor: EasyMDE) => {
|
||||
console.log('SomeButtonOverride');
|
||||
};
|
||||
|
8
types/easymde.d.ts
vendored
8
types/easymde.d.ts
vendored
@ -54,6 +54,7 @@ declare namespace EasyMDE {
|
||||
|
||||
interface Shortcuts {
|
||||
[action: string]: string | undefined | null;
|
||||
|
||||
toggleBlockquote?: string | null;
|
||||
toggleBold?: string | null;
|
||||
cleanBlock?: string | null;
|
||||
@ -115,13 +116,20 @@ declare namespace EasyMDE {
|
||||
|
||||
declare class EasyMDE {
|
||||
constructor(options?: EasyMDE.Options);
|
||||
|
||||
value(): string;
|
||||
value(val: string): void;
|
||||
|
||||
codemirror: CodeMirror.Editor;
|
||||
|
||||
toTextArea(): void;
|
||||
|
||||
isPreviewActive(): boolean;
|
||||
|
||||
isSideBySideActive(): boolean;
|
||||
|
||||
isFullscreenActive(): boolean;
|
||||
|
||||
clearAutosavedValue(): void;
|
||||
|
||||
static toggleBold: (editor: EasyMDE) => void;
|
||||
|
Loading…
x
Reference in New Issue
Block a user