Hello, as I read from https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/track-changes-and-comments/track-changes#supported-commands only some track change commands are available.
For example, Delete row or column is not tracking.
So, I wanted to create workaround, which cancels row deletion and instead remove content of the cells (in TrackChange mode just mark as deleted).
I just have the following idea, but it is not delete text:
function OnClientCommandExecuting(editor, args) {
var commandName = args.get_commandName();
var tool = args.get_tool();
var value = args.get_value();
if (commandName === "DeleteRow") {
args.set_cancel(true);
var range = editor.getSelection().getRange();
var tableRow = range.commonAncestorContainer;
while (tableRow && tableRow.tagName !== "TR") {
tableRow = tableRow.parentNode;
}
if (tableRow) {
var cells = tableRow.cells;
for (var i = 0; i < cells.length; i++) {
var cellContent = cells[i].innerHTML;
var cellRange = editor.get_document().createRange();
cellRange.selectNodeContents(cells[i]);
editor.getSelection().selectRange(cellRange);
editor.executeCommand("Backspace", false, true);
}
}
}
}
Any ideas to fix? Is it more easy solution? May be add to TR attribute "data-del" and define it in css? Is it possible to resolve it in backend?
Thank you!