mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 09:54:28 -06:00
parent
bb3c5cd539
commit
95b177e25c
@ -5,6 +5,7 @@ const editor = new EasyMDE({
|
|||||||
autoDownloadFontAwesome: false,
|
autoDownloadFontAwesome: false,
|
||||||
element: document.getElementById('mdEditor')!,
|
element: document.getElementById('mdEditor')!,
|
||||||
hideIcons: ['side-by-side', 'fullscreen'],
|
hideIcons: ['side-by-side', 'fullscreen'],
|
||||||
|
inputStyle: 'textarea',
|
||||||
shortcuts: {
|
shortcuts: {
|
||||||
drawTable: 'Cmd-Alt-T',
|
drawTable: 'Cmd-Alt-T',
|
||||||
toggleFullScreen: null
|
toggleFullScreen: null
|
||||||
@ -36,6 +37,8 @@ EasyMDE.toggleItalic = (editor: EasyMDE) => {
|
|||||||
const editor2 = new EasyMDE({
|
const editor2 = new EasyMDE({
|
||||||
autoDownloadFontAwesome: undefined,
|
autoDownloadFontAwesome: undefined,
|
||||||
previewClass: ['my-custom-class', 'some-other-class'],
|
previewClass: ['my-custom-class', 'some-other-class'],
|
||||||
|
nativeSpellcheck: true,
|
||||||
|
inputStyle: 'contenteditable',
|
||||||
toolbar: [
|
toolbar: [
|
||||||
{
|
{
|
||||||
name: 'bold',
|
name: 'bold',
|
||||||
@ -136,3 +139,12 @@ const editorImagesCustom = new EasyMDE({
|
|||||||
},
|
},
|
||||||
syncSideBySidePreviewScroll: true
|
syncSideBySidePreviewScroll: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const editorAutosave = new EasyMDE({
|
||||||
|
autosave: {
|
||||||
|
enabled: true,
|
||||||
|
delay: 2000,
|
||||||
|
submit_delay: 10000,
|
||||||
|
uniqueId: 'abc',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
5
types/easymde.d.ts
vendored
5
types/easymde.d.ts
vendored
@ -26,6 +26,7 @@ declare namespace EasyMDE {
|
|||||||
interface AutoSaveOptions {
|
interface AutoSaveOptions {
|
||||||
enabled?: boolean;
|
enabled?: boolean;
|
||||||
delay?: number;
|
delay?: number;
|
||||||
|
submit_delay?: number;
|
||||||
uniqueId: string;
|
uniqueId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,10 +133,12 @@ declare namespace EasyMDE {
|
|||||||
shortcuts?: Shortcuts;
|
shortcuts?: Shortcuts;
|
||||||
showIcons?: ReadonlyArray<string>;
|
showIcons?: ReadonlyArray<string>;
|
||||||
spellChecker?: boolean;
|
spellChecker?: boolean;
|
||||||
|
inputStyle?: 'textarea' | 'contenteditable';
|
||||||
|
nativeSpellcheck?: boolean;
|
||||||
status?: boolean | ReadonlyArray<string | StatusBarItem>;
|
status?: boolean | ReadonlyArray<string | StatusBarItem>;
|
||||||
styleSelectedText?: boolean;
|
styleSelectedText?: boolean;
|
||||||
tabSize?: number;
|
tabSize?: number;
|
||||||
toolbar?: boolean | ReadonlyArray<string | ToolbarIcon>;
|
toolbar?: boolean | ReadonlyArray<'|' | ToolbarIcon>;
|
||||||
toolbarTips?: boolean;
|
toolbarTips?: boolean;
|
||||||
onToggleFullScreen?: (goingIntoFullScreen: boolean) => void;
|
onToggleFullScreen?: (goingIntoFullScreen: boolean) => void;
|
||||||
theme?: string;
|
theme?: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user