Won't Fix
Last Updated: 15 Apr 2015 11:51 by Elena
Completed
Last Updated: 22 Apr 2015 14:01 by ADMIN
Completed
Last Updated: 23 Apr 2015 12:19 by ADMIN
Completed
Last Updated: 07 Jan 2015 12:42 by ADMIN
ADMIN
Created by: Chavdar Dimitrov
Comments: 0
Category: UI for ASP.NET AJAX
Type: Bug Report
0

			
Won't Fix
Last Updated: 15 Apr 2015 07:20 by Elena
ADMIN
Created by: Plamen
Comments: 1
Category: UI for ASP.NET AJAX
Type: Bug Report
0

			
Completed
Last Updated: 20 Apr 2015 15:14 by ADMIN
Completed
Last Updated: 19 Jan 2016 12:57 by ADMIN
Completed
Last Updated: 23 Apr 2015 12:25 by ADMIN
Declined
Last Updated: 17 Mar 2015 13:30 by ADMIN
ADMIN
Created by: Vessy
Comments: 0
Category: UI for ASP.NET AJAX
Type: Bug Report
0

			
Declined
Last Updated: 02 Oct 2015 20:27 by ADMIN
Completed
Last Updated: 17 Mar 2015 14:34 by ADMIN
ADMIN
Created by: Vessy
Comments: 0
Category: UI for ASP.NET AJAX
Type: Bug Report
0

			
Completed
Last Updated: 07 Jun 2016 11:20 by ADMIN
The current behavior of the table insertion works by adding the cursor outside the table. This behavior causes inconsistent issues (e.g. In IE the cursor appears in the last TD, but the typed text is after the table) and faulty user experience.

In desktop rich text editors (e.g. MS Word), when a table is inserted the first table cell is selected and this is the users' expected behavior.

You can test the modified command by following this example:

<telerik:RadEditor runat="server" ID="RadEditor1" OnClientPasteHtml="OnClientPasteHtml">
</telerik:RadEditor>

<script type="text/javascript">
    var identifierID = "RadEditor_AfterTable";

    function OnClientPasteHtml(editor, args) {
        var commandName = args.get_commandName();

        if (commandName === "InsertTable" || commandName === "TableWizard" ) {
            var currValue = args.get_value();
            currValue = currValue.replace(/<\/table>/gi, "</table><div id=" + identifierID + ">&#x200B;</div>");
            //currValue = currValue + "<div id=" + identifierID + ">&#x200B;</div>";
            
            args.set_value(currValue);
            setTimeout(function () {
                selectFirstTD(editor)
            }, 0);
        }
    }

    function selectFirstTD(editor) {
        var $ = $telerik.$;
        var contBody = editor.get_contentArea();
        var identifier = $(contBody).find("#" + identifierID);
        var table = identifier.prev();
        var elmToSelect = table.find("th")[0] || table.find("td")[0];

        if (elmToSelect.childNodes && !$telerik.isIE) {
            elmToSelect = elmToSelect.childNodes[0].nodeName === "#text" && elmToSelect.childNodes[0];
        }

        var hasNextElement = identifier.next()[0];
        
        while (hasNextElement && $(hasNextElement).is("style")) {
            hasNextElement = $(hasNextElement).next()[0];
        }
        
        editor.selectElement(elmToSelect);

        if (!hasNextElement) {
            table.after("<br/>");
        }

        identifier.remove();
    }
</script>
Unplanned
Last Updated: 24 Feb 2014 08:26 by ADMIN
Declined
Last Updated: 26 Aug 2022 11:03 by ADMIN
Declined
Last Updated: 19 Mar 2014 10:46 by ADMIN
Created by: David
Comments: 1
Category: UI for ASP.NET AJAX
Type: Bug Report
0
There is an on your live demo

http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/rows/detailitemtemplate/defaultcs.aspx