Custom Button

3 posts, 0 answers
  1. Antoine
    Antoine avatar
    4 posts
    Member since:
    Oct 2007

    Posted 14 Oct 2007 Link to this post

    Hi All,

    I would like a button that inserts an Iframe with a predefined link. The reason I would like that is so that in Wiki, I can insert a menu on top of every wiki. When a user create a new page, all he would have to do is press the button to insert the menu (iframe)?
    Any Idea?

  2. Rumen
    Rumen avatar
    13197 posts

    Posted 15 Oct 2007 Link to this post

    Hi Antoine,

    To add a custom toolbar button to RadEditor in a Wiki scenario, open the file and put the following red marked tag:

      <tools name="EnhancedToolbar" dockable="false" enabled="true">
        <tool name="Custom1" iconurl="<a path to an image file>" />

    Save the file. This will render a button on the toolbar. After that open the Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\RadEditorList.ascx file and put the red market JAVASCRIPT code in it:

    <SharePoint:RenderingTemplate ID="RichTextField" runat="server">
            <telerik:RadHtmlListField id="RadTextField" runat="server" />
            <script type="text/javascript">
            RadEditorCommandList["Custom1"] = function(commandName, editor, oTool)
                  // Execute your code here, provide it with any arguments that you need, etc.  


    This code will attach a function to the custom button, which will be executed when the user click on the button. In our scenario, the PasteHtml function will insert the sting test in the content area.

    Best regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Antoine
    Antoine avatar
    4 posts
    Member since:
    Oct 2007

    Posted 15 Oct 2007 Link to this post

    Thank you very much for the quick answer. I will give it a go.

    Have a nice day,

Back to Top