getTableCellHTMLElement

Release 2.11.0+

Returns the <td> or <th> HTML element where the caret is positioned. Returns null if the caret/selection is not inside a table cell.

Returns

TypeDescription
HTMLElementThe table cell element (or null)

Example

var td = editor.getTableCellHTMLElement();
td.innerHTML = 'This is a table cell.'; // "This is a table cell."