Add typings for options added in PR #170

pull/173/head
Jeroen Akkerman 4 years ago
parent cca5c07346
commit 4a1e6de4de

@ -161,7 +161,7 @@ const editorImagesCustom = new EasyMDE({
image: 'Insert URL'
},
syncSideBySidePreviewScroll: true
});
});
const editorAutosave = new EasyMDE({
autosave: {
@ -169,5 +169,12 @@ const editorAutosave = new EasyMDE({
delay: 2000,
submit_delay: 10000,
uniqueId: 'abc',
timeFormat: {
locale: 'en-GB',
format: {
month: 'long',
}
},
text: 'Stored: ',
}
});

@ -46,11 +46,19 @@ type ToolbarButton =
| 'guide';
declare namespace EasyMDE {
interface TimeFormatOptions {
locale?: string | string[];
format?: Intl.DateTimeFormatOptions;
}
interface AutoSaveOptions {
enabled?: boolean;
delay?: number;
submit_delay?: number;
uniqueId: string;
timeFormat?: TimeFormatOptions;
text?: string;
}
interface BlockStyleOptions {

Loading…
Cancel
Save