BookStackApp/BookStack

View on GitHub
resources/js/wysiwyg-tinymce/drop-paste-handling.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function drop has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function drop(editor, options, event) {
    const {dom} = editor;
    const rng = window.tinymce.dom.RangeUtils.getCaretRangeFromPoint(
        event.clientX,
        event.clientY,
Severity: Minor
Found in resources/js/wysiwyg-tinymce/drop-paste-handling.js - About 1 hr to fix

    Function paste has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function paste(editor, options, event) {
        const clipboard = new Clipboard(event.clipboardData || event.dataTransfer);
    
        // Don't handle the event ourselves if no items exist of contains table-looking data
        if (!clipboard.hasItems() || clipboard.containsTabularData()) {
    Severity: Minor
    Found in resources/js/wysiwyg-tinymce/drop-paste-handling.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status