Type Editor / @type-editor/tables / input/handle-triple-click / handleTripleClick
Function: handleTripleClick()
ts
function handleTripleClick(view, pos): boolean;Defined in: tables/src/input/handle-triple-click.ts:28
Handles triple-click events to select an entire table cell.
When the user triple-clicks inside a table cell, this selects the entire cell by creating a CellSelection for that cell.
Parameters
| Parameter | Type | Description |
|---|---|---|
view | PmEditorView | The editor view. |
pos | number | The document position where the triple-click occurred. |
Returns
boolean
true if a cell was selected, false if the position is not in a cell.
Example
typescript
// Use in a ProseMirror plugin
new Plugin({
props: {
handleTripleClick: handleTripleClick,
},
});