I downloaded the RadEditor_MOSS_4_5_3.zip and deployed the RadEditorMOSS solution to MOSS 2007. I followed your sample code to make a custom webpart and it doesn't work. The constructor of MOSSRadEditor is missing in RadEditorSharePoint.dll so I can't even instantiate the instance of MOSSRadEditor class. I used RadEditorMOSS_4_5_2_trial.zip and it works.
Could you please let me know what's going on?
using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Telerik.SharePoint;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
namespace Web_Part1
{
public class Web_Part1 : System.Web.UI.WebControls.WebParts.WebPart
{
private MOSSRadEditor contentEditor;
protected override void CreateChildControls()
{
contentEditor = new MOSSRadEditor();//this doesn't work while compiling the code
contentEditor.Content = "Enter content...";
base.CreateChildControls();
}
protected override void Render(HtmlTextWriter writer)
{
EnsureChildControls();
// TODO: add custom rendering code here.
// writer.Write("Output HTML");
}
}
}
Thanks,
Ken
6 Answers, 1 is accepted
Did you do these steps?
It is important to add references to the RadEditor.Net2.dll and RadEditorSharePoint.dll files. To do so, you need to follow these steps:
- Open the RadEditor for MOSS distribution.
- Rename RadEditorMOSS.wsp to RadEditorMOSS.cab and open the file with Windows Cabinet Viewer.
- Copy RadEditor.Net2.dll and RadEditorSharePoint.dll to a convenient place on your disk.
- Add the references to the files in your MOSS project.
If you didn't do Step #4 you would get that error. Remember thats not a "using" statement but a "reference".
Yes, I did add them to the reference. The problem is that if you view RadEditorSharePoint.dll in Object Browser (Visual Studio 2005) by right click RadEditorSharePoint in reference and select "view in object browser" you will see all the classes in this dll. After finding MOSSRadEditor class, you will discover the constructor of this class is missing. Yes, constructor is missing in MOSSRadEditor class.
Due to the missing constructor of this class I couldn't instantiate the instance of this class. Previous version of dll still contains the constructor of MOSSRadEditor class. I don't know why you removed the constructor in current version of dll.
Again, I appreciate your reply, but the problem is that inside the current version of RadEditorSharePoint dll doesn't contain constructor of MOSSRadEditor class at all. Could you please double check again?
We're trying to purchase your product but couldn't make this current version work. Also, I posted an issue regarding to the full version in your ticket system. Please take a look at it. Your answer will help us to purchase your product.
Thanks a lot!
Ken
This section of user manual is the same among different versions.
Thanks for your help.
Ken
My RadEditor_MOSS_4_5_3_dev.zip works OK. Try another download?
BTW the line of code:
contentEditor = new MOSSRadEditor();//this doesn't work while compiling the code
Has a syntax err, there is no type defined for the variable. You not really trying to complile it exactly like that are you? It should be more like
MOSSRadEditor contentEditor = new MOSSRadEditor();//this doesn't work while compiling the code
good luck
This error is usually observed when customers use RadEditor for MOSS Light, which is provided as it is and cannot be used in custom solutions. Please make sure that you are using the full featured version of RadEditor for MOSS.
Kind regards,
George
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
According to answer from Telerik, they removed that constructor on purpose in the lite version (at least the version I downloaded.) Thanks again for spending time answering my questions. :)