Auto-format of `types` folder.

pull/67/head
Jeroen Akkerman 5 years ago
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');
};

14
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;
@ -78,7 +79,7 @@ declare namespace EasyMDE {
interface ToolbarIcon {
name: string;
action: string|((editor: EasyMDE) => void);
action: string | ((editor: EasyMDE) => void);
className: string;
title: string;
}
@ -103,10 +104,10 @@ declare namespace EasyMDE {
shortcuts?: Shortcuts;
showIcons?: ReadonlyArray<string>;
spellChecker?: boolean;
status?: boolean|ReadonlyArray<string|StatusBarItem>;
status?: boolean | ReadonlyArray<string | StatusBarItem>;
styleSelectedText?: boolean;
tabSize?: number;
toolbar?: boolean|ReadonlyArray<string|ToolbarIcon>;
toolbar?: boolean | ReadonlyArray<string | ToolbarIcon>;
toolbarTips?: boolean;
onToggleFullScreen?: (goingIntoFullScreen: boolean) => void;
theme?: string;
@ -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…
Cancel
Save