mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-15 05:54:28 -06:00
test: add minHeight to easymde-test
This commit is contained in:
parent
8436f67dfb
commit
61937dd5ac
@ -15,6 +15,7 @@ const editor = new EasyMDE({
|
||||
console.log('FullscreenToggled', full);
|
||||
},
|
||||
theme: 'someOtherTheme',
|
||||
minHeight: '200px'
|
||||
});
|
||||
|
||||
// Editor functions
|
||||
@ -35,12 +36,16 @@ EasyMDE.toggleItalic = (editor: EasyMDE) => {
|
||||
const editor2 = new EasyMDE({
|
||||
autoDownloadFontAwesome: undefined,
|
||||
previewClass: ['my-custom-class', 'some-other-class'],
|
||||
toolbar: [{
|
||||
toolbar: [
|
||||
{
|
||||
name: 'bold',
|
||||
action: EasyMDE.toggleBold,
|
||||
className: 'fa fa-bolt',
|
||||
title: 'Bold',
|
||||
}, '|', { // Separator
|
||||
title: 'Bold'
|
||||
},
|
||||
'|',
|
||||
{
|
||||
// Separator
|
||||
name: 'alert',
|
||||
action: (editor: EasyMDE) => {
|
||||
alert('This is from a custom button action!');
|
||||
@ -49,15 +54,18 @@ const editor2 = new EasyMDE({
|
||||
className: 'fa fa-star',
|
||||
title: 'A Custom Button',
|
||||
noDisable: undefined,
|
||||
noMobile: false,
|
||||
}, '|', {
|
||||
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,
|
||||
}]
|
||||
noMobile: true
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
editor2.clearAutosavedValue();
|
||||
@ -80,11 +88,11 @@ const editorImages = new EasyMDE({
|
||||
noFileGiven: 'Please select a file',
|
||||
typeNotAllowed: 'This file type is not allowed!',
|
||||
fileTooLarge: 'Image too big',
|
||||
importError: 'Something went oops!',
|
||||
importError: 'Something went oops!'
|
||||
},
|
||||
errorCallback: (errorMessage) => {
|
||||
errorCallback: errorMessage => {
|
||||
console.error(errorMessage);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
const editorImagesCustom = new EasyMDE({
|
||||
@ -109,9 +117,9 @@ const editorImagesCustom = new EasyMDE({
|
||||
noFileGiven: 'Please select a file',
|
||||
typeNotAllowed: 'This file type is not allowed!',
|
||||
fileTooLarge: 'Image too big',
|
||||
importError: 'Something went oops!',
|
||||
importError: 'Something went oops!'
|
||||
},
|
||||
errorCallback: (errorMessage) => {
|
||||
errorCallback: errorMessage => {
|
||||
console.error(errorMessage);
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user