Prevent logseq from entering editing mode when clicking a table cell using javascript

Here are two things to avoid when possible:

  • HTML: Prefer Create table using JavaScript
    • i.e. const table = document.createElement("table") etc.
  • MutationObserver: Prefer adding the event during creation, e.g.:
    table.addEventListener("mousedown", function cancel(e){
        e.stopPropagation()
    })
    
1 Like