2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-06-27 21:21:02 -06:00

Add typings for options added in PR #170

This commit is contained in:
Jeroen Akkerman 2020-03-20 14:35:24 +01:00
parent cca5c07346
commit 4a1e6de4de
2 changed files with 16 additions and 1 deletions

View File

@ -169,5 +169,12 @@ const editorAutosave = new EasyMDE({
delay: 2000,
submit_delay: 10000,
uniqueId: 'abc',
timeFormat: {
locale: 'en-GB',
format: {
month: 'long',
}
},
text: 'Stored: ',
}
});

8
types/easymde.d.ts vendored
View File

@ -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 {