🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

prosemirror-tables

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-tables - npm Package Compare versions

Comparing version

to
0.7.9

CHANGELOG.md

2

package.json
{
"name": "prosemirror-tables",
"version": "0.7.8",
"version": "0.7.9",
"description": "ProseMirror's rowspan/colspan tables component",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -134,4 +134,5 @@ import {Plugin, PluginKey} from "prosemirror-state"

if (width) return width
// Not fixed, read current width from DOM
let domWidth = view.domAtPos(cellPos + 1).node.offsetWidth, parts = colspan
let dom = view.domAtPos(cellPos)
let node = dom.node.childNodes[dom.offset]
let domWidth = node.offsetWidth, parts = colspan
if (colwidth) for (let i = 0; i < colspan; i++) if (colwidth[i]) {

@@ -138,0 +139,0 @@ domWidth -= colwidth[i]

@@ -260,2 +260,13 @@ // This file defines a number of table-related commands.

}
// empty rows cleanup
let pos = rect.tableStart
let table = tr.doc.nodeAt(Math.max(pos - 1, 0))
for (let i = 0; i < table.childCount; i++) {
let row = table.child(i)
if (!row.childCount) {
let rowPos = tr.mapping.map(pos)
tr.delete(rowPos, rowPos + row.nodeSize)
}
pos += row.nodeSize
}
tr.setNodeMarkup(mergedPos + rect.tableStart, null,

@@ -262,0 +273,0 @@ setAttr(addColSpan(mergedCell.attrs, mergedCell.attrs.colspan, (rect.right - rect.left) - mergedCell.attrs.colspan),

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet