mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-15 14:04: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);
|
console.log('FullscreenToggled', full);
|
||||||
},
|
},
|
||||||
theme: 'someOtherTheme',
|
theme: 'someOtherTheme',
|
||||||
|
minHeight: '200px'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Editor functions
|
// Editor functions
|
||||||
@ -35,12 +36,16 @@ 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',
|
name: 'bold',
|
||||||
action: EasyMDE.toggleBold,
|
action: EasyMDE.toggleBold,
|
||||||
className: 'fa fa-bolt',
|
className: 'fa fa-bolt',
|
||||||
title: 'Bold',
|
title: 'Bold'
|
||||||
}, '|', { // Separator
|
},
|
||||||
|
'|',
|
||||||
|
{
|
||||||
|
// Separator
|
||||||
name: 'alert',
|
name: 'alert',
|
||||||
action: (editor: EasyMDE) => {
|
action: (editor: EasyMDE) => {
|
||||||
alert('This is from a custom button action!');
|
alert('This is from a custom button action!');
|
||||||
@ -49,15 +54,18 @@ const editor2 = new EasyMDE({
|
|||||||
className: 'fa fa-star',
|
className: 'fa fa-star',
|
||||||
title: 'A Custom Button',
|
title: 'A Custom Button',
|
||||||
noDisable: undefined,
|
noDisable: undefined,
|
||||||
noMobile: false,
|
noMobile: false
|
||||||
}, '|', {
|
},
|
||||||
|
'|',
|
||||||
|
{
|
||||||
name: 'link',
|
name: 'link',
|
||||||
action: 'https://github.com/Ionaru/easy-markdown-editor',
|
action: 'https://github.com/Ionaru/easy-markdown-editor',
|
||||||
className: 'fa fab fa-github',
|
className: 'fa fab fa-github',
|
||||||
title: 'A Custom Link',
|
title: 'A Custom Link',
|
||||||
noDisable: true,
|
noDisable: true,
|
||||||
noMobile: 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…
x
Reference in New Issue
Block a user