apply linter

This commit is contained in:
Simon Vieille 2021-06-15 14:33:51 +02:00
parent fd480f980e
commit a1c187ec8d
1 changed files with 89 additions and 89 deletions

View File

@ -1,95 +1,95 @@
const Editor = require('simplemde');
const $ = require('jquery');
const Editor = require('simplemde')
const $ = require('jquery')
module.exports = () => {
elements = $('textarea[data-simplemde]')
const elements = $('textarea[data-simplemde]')
elements.each((i, element) => {
$(element).removeClass('form-control')
elements.each((i, element) => {
$(element).removeClass('form-control')
new Editor({
element: element,
forceSync: true,
autoDownloadFontAwesome: false,
spellChecker: false,
styleSelectedText: false,
toolbar: [
{
name: "bold",
action: Editor.toggleBold,
className: "fa fa-bold",
title: "Bold",
},
{
name: "italic",
action: Editor.toggleItalic,
className: "fa fa-italic",
title: "Italic",
},
{
name: "heading",
action: Editor.toggleHeadingSmaller,
className: "fa fa-heading",
title: "Heading",
},
"|",
{
name: "quote",
action: Editor.toggleBlockquote,
className: "fa fa-quote-left",
title: "Quote",
},
{
name: "unordered-list",
action: Editor.toggleUnorderedList,
className: "fa fa-list-ul",
title: "Generic List",
},
{
name: "ordered-list",
action: Editor.toggleOrderedList,
className: "fa fa-list-ol",
title: "Numbered List",
},
{
name: "table",
action: Editor.drawTable,
className: "fa fa-table",
title: "Insert Table",
},
"|",
{
name: "link",
action: Editor.drawLink,
className: "fa fa-link",
title: "Create Link",
},
{
name: "image",
action: Editor.drawImage,
className: "fa fa-image",
title: "Insert Image",
},
"|",
{
name: "preview",
action: Editor.togglePreview,
className: "fa fa-eye no-disable",
title: "togglePreview",
},
{
name: "side-by-side",
action: Editor.toggleSideBySide,
className: "fa fa-columns no-disable no-mobile",
title: "Toggle Side by Side",
},
{
name: "fullscreen",
action: Editor.toggleFullScreen,
className: "fa fa-arrows-alt no-disable no-mobile",
title: "Toggle Fullscreen",
},
],
})
new Editor({
element: element,
forceSync: true,
autoDownloadFontAwesome: false,
spellChecker: false,
styleSelectedText: false,
toolbar: [
{
name: 'bold',
action: Editor.toggleBold,
className: 'fa fa-bold',
title: 'Bold'
},
{
name: 'italic',
action: Editor.toggleItalic,
className: 'fa fa-italic',
title: 'Italic'
},
{
name: 'heading',
action: Editor.toggleHeadingSmaller,
className: 'fa fa-heading',
title: 'Heading'
},
'|',
{
name: 'quote',
action: Editor.toggleBlockquote,
className: 'fa fa-quote-left',
title: 'Quote'
},
{
name: 'unordered-list',
action: Editor.toggleUnorderedList,
className: 'fa fa-list-ul',
title: 'Generic List'
},
{
name: 'ordered-list',
action: Editor.toggleOrderedList,
className: 'fa fa-list-ol',
title: 'Numbered List'
},
{
name: 'table',
action: Editor.drawTable,
className: 'fa fa-table',
title: 'Insert Table'
},
'|',
{
name: 'link',
action: Editor.drawLink,
className: 'fa fa-link',
title: 'Create Link'
},
{
name: 'image',
action: Editor.drawImage,
className: 'fa fa-image',
title: 'Insert Image'
},
'|',
{
name: 'preview',
action: Editor.togglePreview,
className: 'fa fa-eye no-disable',
title: 'togglePreview'
},
{
name: 'side-by-side',
action: Editor.toggleSideBySide,
className: 'fa fa-columns no-disable no-mobile',
title: 'Toggle Side by Side'
},
{
name: 'fullscreen',
action: Editor.toggleFullScreen,
className: 'fa fa-arrows-alt no-disable no-mobile',
title: 'Toggle Fullscreen'
}
]
})
})
}