Pasting table from Excel and table tags descriptions

Last post 04-03-2013, 4:07 PM by cw3. 2 replies.
Sort Posts: Previous Next
  •  04-01-2013, 7:11 PM 77125

    Pasting table from Excel and table tags descriptions

    1. We are having an issue with pasting a table from Excel 2010. If we are using IE 9 and copy a table in from Excel, the following code is copied over within the table tag:

    1. <colgroup>  
    2.     <col span="2" style="background-color:red">  
    3.     <col style="background-color:yellow">  
    4.   </colgroup>  
    The table is inserted however in the design view the table is not visible. If we click on the preview button, it is visible. If we use a prior version of IE or IE 9 compatibilty view, it is displayed. If we use another browser, it is visible. Is there a way to remove those tags during the html clean up process?

     

    2. When editing the table rows and cells, the description for rows (tr) and cells (td) for non-developer users is cryptic. As developers, we know what tr and td stand for however other users do not. Is there a way to change the description?

     

    Thank you

    Filed under: ,
  •  04-02-2013, 12:25 PM 77130 in reply to 77125

    Re: Pasting table from Excel and table tags descriptions

    Hi,

     

    Question 1

     

    You can use the api below to filter the paste html code. The variable html is the paste content, you can filter it and return the final content by info.ReturnValue.

     

    <script type='text/javascript'>
        function RichTextEditor_OnPasteFilter(editor, info) {
            var html = info.Arguments[0];
            var cmd = info.Arguments[1];
            info.ReturnValue = "<br/>You fire " + cmd + " to paste {<hr/>" + html + "<hr/>}.";
        }
    </script>
     

    Question 2

     

    Can you post a screenshot to show which description you mean?

     

    Regards,

     

    Ken 

  •  04-03-2013, 4:07 PM 77148 in reply to 77130

    Re: Pasting table from Excel and table tags descriptions

    Thank you Ken. The first issue has ben resolved. Attached is the requested screen shot. Developers know what tags are however non-developer users usually do not. So when one of those users creates a table and tries to change the background color of the table top row, they might not know where to go. Is it possible for us to rename the items in the Tags block to Row(tr) and Cell(td)?

     

View as RSS news feed in XML