This is a migrated thread and some comments may be shown as answers.

Editor in a master page not working

4 Answers 194 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Zal
Top achievements
Rank 1
Zal asked on 03 Jul 2008, 12:44 PM
Dear All,

I have downloaded the trial version of the new rad controls and have copied acorss the dll into my bin folder.

I have been updating the controls which i have used in the previous version.

I have managed to successful upgrade the radCalendar.

But have faced an issue with the RadEditor control.

I have tried loading a redEditor control onto the screen without using a master page and it works fine.  But when i try to laod an RadEditor control using a master page as my template, i enocunter a problem on the Firefox browser, is there a knowen error?

Instead of seeing the control on the screen a list of bullet points is displayed scrolling down the screen.

Another issue i have is that i have iconimages which i want ot load using the Tools.xml file.  But in the example on your site it states to put it on the actaul page, but if i include the Tools.xml file it doesnt work (tried http://www.telerik.com/support/kb/article/b454K-kdc-b454T-btc-b454c-btc.aspx )

any help is mch appreicated.

Many thanks in advance

Zal

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Jul 2008, 02:50 PM
Hi Zal,

Straight to the points:
  1. For some reason the editor is not able to load its css styles. Is it possible to possible to open a support ticket and send us a sample working project that demonstrates the problem? I will examine it and provide a solution after that.
  2. RadEditor for ASP.NET AJAX has a new enhanced toolbar architecture based on css image sprites. To see how to set an icon to the toolbar button, please see the following help article: Adding Your Own Buttons. You can also see how to load the images in the emoticons dropdown in the following live example: Custom Tools.

    Please, review also the following article: Migration from RadEditor Classic to RadEditor for ASP.NET AJAX.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Zal
Top achievements
Rank 1
answered on 03 Jul 2008, 03:12 PM
Rumen,

Thank-you for your quick response.

I stupidly have not copied across the css files, so I'll give that a go and see what happens.

I did try and open a support ticket and send across some sample code but couldnt find the link as i kept getting redirected to http://www.telerik.com/client.net/my-support-tickets/my-support-tickets.aspx where i cant see to create a new support ticket.

i only get the option to browse exisitng KB articles.

Also i have read through the adding your own buttons, but it does not work.
I want to only put a couple of icons on the tool bar like the copy paste, which i have included in the tools.xml file.  but on the same control i want to add my custom icons drop down list, previuos version allowed this to happen in just the tools.xml file.  But if i try to include the tools.xml file with the icons for the emitons they dont appear.  If i add the icons with the radeditor control on the actual page, then i cant view my tools.xml controls.  It will only show me the dropdown lsit of emiticons. 

Kind Regards
Zal
0
Rumen
Telerik team
answered on 09 Jul 2008, 08:27 AM
Hi Zal,

You have not downloaded the RadControls for ASP.NET AJAX suite from your Client.net account and that is why you are not able to open a support ticket. For your convenience, I enabled the support ticketing option under your account and you will be able to open a support ticket and send me the requested working project (see the attached screenshot for more information).

Here is a step-by-step tutorial how to create a custom emoticons dropdown in the ToolsFile.xml file of the new RadEditor:
1) Open the ToolsFile.xml file and declare the emoticons dropdown:

ToolsFile.xml:

<tool name="Emoticons" Name="Emoticons" Text="Emoticons" type="dropdown"  ItemsPerRow="3" PopupWidth="90" PopupHeight="90">
     <item  name="&lt;img src='./Emoticons/smil1.gif' />"  value="./Emoticons/smil1.gif"  />
     <item  name="&lt;img src='./Emoticons/smil2.gif' />" value="./Emoticons/smil2.gif" />
     <item  name="&lt;img src='./Emoticons/smil3.gif' />" value="./Emoticons/smil3.gif" />
     <item  name="&lt;img src='./Emoticons/smil4.gif' />" value="./Emoticons/smil4.gif" />
     <item  name="&lt;img src='./Emoticons/smil8.gif' />" value="./Emoticons/smil8.gif" />
     <item  name="&lt;img src='./Emoticons/smil6.gif' />" value="./Emoticons/smil6.gif" />
     <item  name="&lt;img src='./Emoticons/smil7.gif' />" value="./Emoticons/smil7.gif" />
     <item  name="&lt;img src='./Emoticons/smil9.gif' />" value="./Emoticons/smil9.gif" />
     <item  name="&lt;img src='./Emoticons/smil11.gif' />" value="./Emoticons/smil11.gif" />    
</tool>

You need to put type="dropdown" in the tool tag in order to tell the editor that the tool will be a dropdown. The inner item tags represents the different dropdown items. The name value is the item that will be visible in the dropdown and the value attribute is the value that will be supplied to the args.get_value(); of the OnClientCommandExecuting event of RadEditor.

2) The next steps is to register the OnClientCommandExecuting event and the OnClientCommandExecuting function:

    <telerik:radeditor runat="server" ID="RadEditor1" ToolsFile="~/ToolsFile.xml" OnClientCommandExecuting="OnClientCommandExecuting"></telerik:radeditor>
    <script type="text/javascript">
    function OnClientCommandExecuting(editor, args)
    {
        var name = args.get_name();
        var val = args.get_value();
        if (name == "Emoticons")
        {
            editor.pasteHtml("<img src='" + val + "'>");
            //Cancel the further execution of the command as such a command does not exist in the editor command list
            args.set_cancel(true);
        }
    }
    </script>

For your convenience I have attached a sample project that demonstrates how the custom dropdown works.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Zal
Top achievements
Rank 1
answered on 09 Jul 2008, 10:54 AM
Thank-you so much,  I tried out it out and it worked, what i was doing was in the tools.xml file i was writting out
<item iconurl>
 rather than the
 name="&lt;img src='' />"

Once again thank-you so much.

Zal
Tags
Editor
Asked by
Zal
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Zal
Top achievements
Rank 1
Share this question
or