mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Ran eslint fix on existing codebase
Had to do some manual fixing of the app.js file due to misplaced comments
This commit is contained in:
@ -6,23 +6,22 @@ function getContentToInsert({html, markdown}) {
|
||||
* @param {MarkdownEditor} editor
|
||||
*/
|
||||
export function listen(editor) {
|
||||
|
||||
window.$events.listen('editor::replace', (eventContent) => {
|
||||
window.$events.listen('editor::replace', eventContent => {
|
||||
const markdown = getContentToInsert(eventContent);
|
||||
editor.actions.replaceContent(markdown);
|
||||
});
|
||||
|
||||
window.$events.listen('editor::append', (eventContent) => {
|
||||
window.$events.listen('editor::append', eventContent => {
|
||||
const markdown = getContentToInsert(eventContent);
|
||||
editor.actions.appendContent(markdown);
|
||||
});
|
||||
|
||||
window.$events.listen('editor::prepend', (eventContent) => {
|
||||
window.$events.listen('editor::prepend', eventContent => {
|
||||
const markdown = getContentToInsert(eventContent);
|
||||
editor.actions.prependContent(markdown);
|
||||
});
|
||||
|
||||
window.$events.listen('editor::insert', (eventContent) => {
|
||||
window.$events.listen('editor::insert', eventContent => {
|
||||
const markdown = getContentToInsert(eventContent);
|
||||
editor.actions.insertContent(markdown);
|
||||
});
|
||||
@ -30,4 +29,4 @@ export function listen(editor) {
|
||||
window.$events.listen('editor::focus', () => {
|
||||
editor.actions.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user