mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-06-28 05:31:06 -06:00
Add typings for options added in PR #170
This commit is contained in:
parent
cca5c07346
commit
4a1e6de4de
@ -161,7 +161,7 @@ const editorImagesCustom = new EasyMDE({
|
|||||||
image: 'Insert URL'
|
image: 'Insert URL'
|
||||||
},
|
},
|
||||||
syncSideBySidePreviewScroll: true
|
syncSideBySidePreviewScroll: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const editorAutosave = new EasyMDE({
|
const editorAutosave = new EasyMDE({
|
||||||
autosave: {
|
autosave: {
|
||||||
@ -169,5 +169,12 @@ const editorAutosave = new EasyMDE({
|
|||||||
delay: 2000,
|
delay: 2000,
|
||||||
submit_delay: 10000,
|
submit_delay: 10000,
|
||||||
uniqueId: 'abc',
|
uniqueId: 'abc',
|
||||||
|
timeFormat: {
|
||||||
|
locale: 'en-GB',
|
||||||
|
format: {
|
||||||
|
month: 'long',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: 'Stored: ',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
8
types/easymde.d.ts
vendored
8
types/easymde.d.ts
vendored
@ -46,11 +46,19 @@ type ToolbarButton =
|
|||||||
| 'guide';
|
| 'guide';
|
||||||
|
|
||||||
declare namespace EasyMDE {
|
declare namespace EasyMDE {
|
||||||
|
|
||||||
|
interface TimeFormatOptions {
|
||||||
|
locale?: string | string[];
|
||||||
|
format?: Intl.DateTimeFormatOptions;
|
||||||
|
}
|
||||||
|
|
||||||
interface AutoSaveOptions {
|
interface AutoSaveOptions {
|
||||||
enabled?: boolean;
|
enabled?: boolean;
|
||||||
delay?: number;
|
delay?: number;
|
||||||
submit_delay?: number;
|
submit_delay?: number;
|
||||||
uniqueId: string;
|
uniqueId: string;
|
||||||
|
timeFormat?: TimeFormatOptions;
|
||||||
|
text?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BlockStyleOptions {
|
interface BlockStyleOptions {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user