test: add minHeight to easymde-test

pull/123/head
Duong Tran 5 years ago
parent 8436f67dfb
commit 61937dd5ac

@ -15,6 +15,7 @@ const editor = new EasyMDE({
console.log('FullscreenToggled', full); console.log('FullscreenToggled', full);
}, },
theme: 'someOtherTheme', theme: 'someOtherTheme',
minHeight: '200px'
}); });
// Editor functions // Editor functions
@ -35,29 +36,36 @@ 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'],
toolbar: [{ toolbar: [
name: 'bold', {
action: EasyMDE.toggleBold, name: 'bold',
className: 'fa fa-bolt', action: EasyMDE.toggleBold,
title: 'Bold', className: 'fa fa-bolt',
}, '|', { // Separator title: 'Bold'
name: 'alert',
action: (editor: EasyMDE) => {
alert('This is from a custom button action!');
// Custom functions have access to the `editor` instance.
}, },
className: 'fa fa-star', '|',
title: 'A Custom Button', {
noDisable: undefined, // Separator
noMobile: false, name: 'alert',
}, '|', { action: (editor: EasyMDE) => {
name: 'link', alert('This is from a custom button action!');
action: 'https://github.com/Ionaru/easy-markdown-editor', // Custom functions have access to the `editor` instance.
className: 'fa fab fa-github', },
title: 'A Custom Link', className: 'fa fa-star',
noDisable: true, title: 'A Custom Button',
noMobile: true, noDisable: undefined,
}] noMobile: false
},
'|',
{
name: 'link',
action: 'https://github.com/Ionaru/easy-markdown-editor',
className: 'fa fab fa-github',
title: 'A Custom Link',
noDisable: true,
noMobile: true
}
]
}); });
editor2.clearAutosavedValue(); editor2.clearAutosavedValue();
@ -80,11 +88,11 @@ const editorImages = new EasyMDE({
noFileGiven: 'Please select a file', noFileGiven: 'Please select a file',
typeNotAllowed: 'This file type is not allowed!', typeNotAllowed: 'This file type is not allowed!',
fileTooLarge: 'Image too big', fileTooLarge: 'Image too big',
importError: 'Something went oops!', importError: 'Something went oops!'
}, },
errorCallback: (errorMessage) => { errorCallback: errorMessage => {
console.error(errorMessage); console.error(errorMessage);
}, }
}); });
const editorImagesCustom = new EasyMDE({ const editorImagesCustom = new EasyMDE({
@ -109,9 +117,9 @@ const editorImagesCustom = new EasyMDE({
noFileGiven: 'Please select a file', noFileGiven: 'Please select a file',
typeNotAllowed: 'This file type is not allowed!', typeNotAllowed: 'This file type is not allowed!',
fileTooLarge: 'Image too big', fileTooLarge: 'Image too big',
importError: 'Something went oops!', importError: 'Something went oops!'
}, },
errorCallback: (errorMessage) => { errorCallback: errorMessage => {
console.error(errorMessage); console.error(errorMessage);
}, }
}); });

Loading…
Cancel
Save