mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 09:54:28 -06:00
Added more tests for the types file.
This commit is contained in:
parent
5a37a534dc
commit
5b01fba882
@ -1,4 +1,5 @@
|
|||||||
new EasyMDE({
|
// Create new instance
|
||||||
|
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"],
|
||||||
@ -6,5 +7,20 @@ new EasyMDE({
|
|||||||
drawTable: "Cmd-Alt-T",
|
drawTable: "Cmd-Alt-T",
|
||||||
toggleFullScreen: null
|
toggleFullScreen: null
|
||||||
},
|
},
|
||||||
spellChecker: false
|
spellChecker: false,
|
||||||
|
onToggleFullScreen: (full: boolean) => { console.log('FullscreenToggled', full); },
|
||||||
|
theme: 'someOtherTheme',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Editor functions
|
||||||
|
const value = editor.value() as string;
|
||||||
|
editor.value(value.toUpperCase());
|
||||||
|
|
||||||
|
const sbs = editor.isSideBySideActive() as boolean;
|
||||||
|
const fullscreen = editor.isFullscreenActive() as boolean;
|
||||||
|
|
||||||
|
// Access to codemirror object
|
||||||
|
editor.codemirror.setOption('readOnly', true);
|
||||||
|
|
||||||
|
// Static properties
|
||||||
|
EasyMDE.toggleItalic = (editor: EasyMDE) => { console.log('SomeButtonOverride'); };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user