prosemirror-tables
Advanced tools
Comparing version 0.9.2 to 0.9.3
{ | ||
"name": "prosemirror-tables", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"description": "ProseMirror's rowspan/colspan tables component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -9,2 +9,3 @@ // This file defines helpers for normalizing tables, making sure no | ||
import {tableNodeTypes} from "./schema" | ||
import {key} from "./util" | ||
@@ -103,3 +104,3 @@ // Helper for iterating through the nodes in a document that changed | ||
} | ||
return tr | ||
return tr.setMeta(key, { fixTables: true }) | ||
} |
@@ -10,3 +10,3 @@ // This file defines a plugin that handles the drawing of cell | ||
import {handleTripleClick, handleKeyDown, handlePaste, handleMouseDown} from "./input" | ||
import {key} from "./util" | ||
import {key as tableEditingKey} from "./util" | ||
import {drawCellSelection, normalizeSelection} from "./cellselection" | ||
@@ -29,3 +29,3 @@ import {fixTables} from "./fixtables" | ||
return new Plugin({ | ||
key, | ||
key: tableEditingKey, | ||
@@ -38,3 +38,3 @@ // This piece of state is used to remember when a mouse-drag | ||
apply(tr, cur) { | ||
let set = tr.getMeta(key) | ||
let set = tr.getMeta(tableEditingKey) | ||
if (set != null) return set == -1 ? null : set | ||
@@ -55,3 +55,3 @@ if (cur == null || !tr.docChanged) return cur | ||
createSelectionBetween(view) { | ||
if (key.getState(view.state) != null) return view.state.selection | ||
if (tableEditingKey.getState(view.state) != null) return view.state.selection | ||
}, | ||
@@ -77,2 +77,3 @@ | ||
export {TableMap} from "./tablemap" | ||
export {tableEditingKey}; | ||
export * from "./commands" | ||
@@ -79,0 +80,0 @@ export {columnResizing, key as columnResizingPluginKey} from "./columnresizing" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1051272
19737