Hello,
I have a button in the Radeditor that calls a custom command. The command sets the bottom border of a table cell by adjusting the style attribute of a <td> tag. It works fine when the cursor is in the target cell. However, when I select multiple cells in the table, the border is only applied to the last cell I select. I suppose this is behaving as it should (setting the style of the last active cell), but I am wondering how I would approach adjusting the code to handle multiple cell selects? I had a look at the getSelection and getSelectionHtml methods and wasn't able to find a working solution. Any help would be appreciated. Here's my existing code snippet:
Telerik.Web.UI.Editor.CommandList["DoubleBottomBorder"] = function(commandName, editor, args) {
var command = new Telerik.Web.UI.Editor.GenericCommand(commandName, editor.get_contentWindow(), editor);
var elem = editor.getSelectedElement();
elem.style.borderBottom = "3px double #000000";
editor.executeCommand(command);
};
Regards,
Andrew