您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
easy-markdown-editor/types/easymde-test.ts

31 行
828 B
TypeScript

// Create new instance
const editor = new EasyMDE({
autoDownloadFontAwesome: false,
element: document.getElementById('mdEditor')!,
hideIcons: ['side-by-side', 'fullscreen'],
shortcuts: {
drawTable: 'Cmd-Alt-T',
toggleFullScreen: null
},
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');
};