mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +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:
@ -3,10 +3,10 @@
|
||||
* @param {String} url
|
||||
*/
|
||||
function register(editor, url) {
|
||||
editor.addCommand('InsertHorizontalRule', function () {
|
||||
let hrElem = document.createElement('hr');
|
||||
let cNode = editor.selection.getNode();
|
||||
let parentNode = cNode.parentNode;
|
||||
editor.addCommand('InsertHorizontalRule', () => {
|
||||
const hrElem = document.createElement('hr');
|
||||
const cNode = editor.selection.getNode();
|
||||
const {parentNode} = cNode;
|
||||
parentNode.insertBefore(hrElem, cNode);
|
||||
});
|
||||
|
||||
@ -15,15 +15,14 @@ function register(editor, url) {
|
||||
tooltip: 'Insert horizontal line',
|
||||
onAction() {
|
||||
editor.execCommand('InsertHorizontalRule');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {WysiwygConfigOptions} options
|
||||
* @return {register}
|
||||
*/
|
||||
export function getPlugin(options) {
|
||||
return register;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user