mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 23:54:28 -06:00
Auto-format of types
folder.
This commit is contained in:
parent
df530cf465
commit
c1a695af51
@ -1,14 +1,16 @@
|
|||||||
// Create new instance
|
// Create new instance
|
||||||
const editor = new EasyMDE({
|
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'],
|
||||||
shortcuts: {
|
shortcuts: {
|
||||||
drawTable: "Cmd-Alt-T",
|
drawTable: 'Cmd-Alt-T',
|
||||||
toggleFullScreen: null
|
toggleFullScreen: null
|
||||||
},
|
},
|
||||||
spellChecker: false,
|
spellChecker: false,
|
||||||
onToggleFullScreen: (full: boolean) => { console.log('FullscreenToggled', full); },
|
onToggleFullScreen: (full: boolean) => {
|
||||||
|
console.log('FullscreenToggled', full);
|
||||||
|
},
|
||||||
theme: 'someOtherTheme',
|
theme: 'someOtherTheme',
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -23,4 +25,6 @@ const fullscreen = editor.isFullscreenActive() as boolean;
|
|||||||
editor.codemirror.setOption('readOnly', true);
|
editor.codemirror.setOption('readOnly', true);
|
||||||
|
|
||||||
// Static properties
|
// Static properties
|
||||||
EasyMDE.toggleItalic = (editor: EasyMDE) => { console.log('SomeButtonOverride'); };
|
EasyMDE.toggleItalic = (editor: EasyMDE) => {
|
||||||
|
console.log('SomeButtonOverride');
|
||||||
|
};
|
||||||
|
8
types/easymde.d.ts
vendored
8
types/easymde.d.ts
vendored
@ -54,6 +54,7 @@ declare namespace EasyMDE {
|
|||||||
|
|
||||||
interface Shortcuts {
|
interface Shortcuts {
|
||||||
[action: string]: string | undefined | null;
|
[action: string]: string | undefined | null;
|
||||||
|
|
||||||
toggleBlockquote?: string | null;
|
toggleBlockquote?: string | null;
|
||||||
toggleBold?: string | null;
|
toggleBold?: string | null;
|
||||||
cleanBlock?: string | null;
|
cleanBlock?: string | null;
|
||||||
@ -115,13 +116,20 @@ declare namespace EasyMDE {
|
|||||||
|
|
||||||
declare class EasyMDE {
|
declare class EasyMDE {
|
||||||
constructor(options?: EasyMDE.Options);
|
constructor(options?: EasyMDE.Options);
|
||||||
|
|
||||||
value(): string;
|
value(): string;
|
||||||
value(val: string): void;
|
value(val: string): void;
|
||||||
|
|
||||||
codemirror: CodeMirror.Editor;
|
codemirror: CodeMirror.Editor;
|
||||||
|
|
||||||
toTextArea(): void;
|
toTextArea(): void;
|
||||||
|
|
||||||
isPreviewActive(): boolean;
|
isPreviewActive(): boolean;
|
||||||
|
|
||||||
isSideBySideActive(): boolean;
|
isSideBySideActive(): boolean;
|
||||||
|
|
||||||
isFullscreenActive(): boolean;
|
isFullscreenActive(): boolean;
|
||||||
|
|
||||||
clearAutosavedValue(): void;
|
clearAutosavedValue(): void;
|
||||||
|
|
||||||
static toggleBold: (editor: EasyMDE) => void;
|
static toggleBold: (editor: EasyMDE) => void;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user