Insert Table and Table Accessibility (THEAD -TH)

4 posts, 0 answers
  1. Dario
    Dario avatar
    3 posts
    Member since:
    Apr 2009

    Posted 02 Apr 2009 Link to this post

    Hello,

    By default the "Insert Table" button creates a table with a <TBODY> tag only:

    "AS IS"
    <table>
        <tbody>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
        </tbody>
    </table>

    Is it possible to override this behavior in order to insert the first row within the <THEAD> tag automatically and avoid to set this property via "Table Properties - Accessibility" tab?

    "DESIDERATA"
    <table>
        <thead>
            <tr>
                <th >&nbsp;</th>
                <th >&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
        </tbody>
    </table>

    Thanks,
    Dario.
  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 06 Apr 2009 Link to this post

    Hello Dario,

    It is possible to overwrite the command. But in order to help you further I need to know which version of RadEditor for MOSS are you using? So please provide me with this information and will give you a corresponding example of how to overwrite the InsertTable command. 


    Greetings,
    Stanimir
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.

  3. Dario
    Dario avatar
    3 posts
    Member since:
    Apr 2009

    Posted 06 Apr 2009 Link to this post

    Hello Stanimir,

    We are testing the demo version of the product, so the version number is 5.3.2.0.
    Nevertheless we're going to buy the latest version of RadControls for ASP.NET AJAX ,so if it includes a different version of RadEditor for MOSS, please could you also provide us with the related example?

    Thank you for your support.
    Dario.
  4. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 07 Apr 2009 Link to this post

    Hello Dario,

    Since you are using 5.3.2 version of RadEditor for MOSS there is no need to overwrite the "Insert Table" command. What you can do is attach to the OnClientPasteHtml event. You can find example of the functionality in the following online demo of the RadEditor http://demos.telerik.com/aspnet-ajax/editor/examples/onclientpastehtml/defaultcs.aspx. There is additional information for the event in the following help article http://www.telerik.com/help/aspnet-ajax/onclientpastehtml.html.

    What you should know is that since you are using RadEditor for MOSS, in order to attach to the OnClientPasetHtml event you need to follow these steps.
    1. Modify the respective ConfigFile.xml or ListConfigFile.xml (for forms scenarios such as list, wiki, blog...), which are located in the Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.3.2.0__1f131a624888eeed\Resources folder.
    For example add the following line.
    <property name="OnClientPasteHtml">OnClientPasteHtml</property> 

    2. Add the OnClientPaseHtml javascript methods in the MOSSEditorTools.js, which is located in the mentioned above folder.
    For example.
    function OnClientPasteHtml(sender, args) 
        //here you can get reference to the table and add the <thead> element 

    I hope this helps.


    Greetings,
    Stanimir
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top