Мне нужно создать выборку с помощью собственных методов JS или TinyMCE.
В настоящее время у меня есть этот код, который делает то, что показано на изображении ниже:
Код: Выделить всё
const table = editor.dom.getParent(editor.selection.getNode(), 'table');
if (table) {
editor.selection.select(table);
}
Код: Выделить всё
const table = editor.dom.getParent(editor.selection.getNode(), 'table');
if (table) {
const rng = editor.dom.createRng();
rng.selectNode(table);
editor.selection.setRng(rng);
}
I need to make this type of selection (this selection is with the mouse):
Expected result image
Источник: https://stackoverflow.com/questions/781 ... or-tinymce
Мобильная версия