Rajesh Sivaraman
|
Posted: 12/12/2004, 9:49 PM |
|
Hi,
Has any one integrated any HTML editors in CodeChargeStudio. I tried to integrate the FCKEditor, but I was not able to. Any help regarding this will be greatly appreciated.
Regards
Rajesh Sivaraman.
|
|
|
Jaro Steigauf
|
Posted: 12/12/2004, 10:47 PM |
|
Step by Step:
1. HTML file:
<!-- BEGIN FCKEditorASPX -->
<%@ Register TagPrefix="fckeditorv2" Namespace="FredCK.FCKeditorV2"
Assembly="FredCK.FCKeditorV2" %><!-- END FCKEditorASPX --><html>
<head> ....
<BODY> ....
<!-- BEGIN FCKEditor -->
<FCKeditorV2:FCKeditor id="FCKeditor1" runat="server" width="100%"
height="700px"></FCKeditorV2:FCKeditor>
<!-- END FCKEditor -->
2. AspxFileName.aspx.cs
//End Forms Objects
protected FredCK.FCKeditorV2.FCKeditor FCKeditor1;
For example:
//Record products Event BeforeShow. Action Custom Code @23-2A29BDB7
// -------------------------
// Write your own code here.
this.FCKeditor1.Value = productsproducts_description.Text;
//Page Event AfterInitialize. Action FCKEditor OnInit @207-AC4992E4
// -------------------------
// Write FCKEditor OnInit
this.FCKeditor1.ValueChanged += new
System.EventHandler(this.SaveValue);
// I change tag from <P> to <br>
private void SaveValue(object sender, System.EventArgs e)
{
string h = this.FCKeditor1.Value;
if (productsListBox1.Value == "1")
{
h = this.FCKeditor1.Value.Replace("<P>","");
h = h.Replace("</P>","<BR>");
}
productsproducts_description.Text = h;
}
3. I made changes in FCKeditor.cs = this.FCKeditor1.ValueChanged ...
public class FCKeditor : System.Web.UI.Control, IPostBackDataHandler
A.
{
private FCKeditorConfigurations oConfig ;
private static readonly object ValueChangedEvent = new object (); ....
B.
public event EventHandler ValueChanged
{
add { Events.AddHandler(ValueChangedEvent, value) ; }
remove { Events.RemoveHandler(ValueChangedEvent, value) ; }
}
protected virtual void OnValueChanged(EventArgs e)
{
if(Events != null)
{
EventHandler oEventHandler = (EventHandler)Events[ValueChangedEvent] ;
if (oEventHandler != null) oEventHandler(this, e);
}
}
protected override void Render(HtmlTextWriter writer)
.......
C.
public void RaisePostDataChangedEvent()
{
// Do nothing
OnValueChanged(EventArgs.Empty);
}
If you click on the button Save, then you saving value from editor to some
variable.
REGARDS
jaro
<RajeshSivaraman@forum.codecharge (Rajesh Sivaraman)> wrote in message
news:841bd2d6e93138@news.codecharge.com...
> Hi,
>
> Has any one integrated any HTML editors in CodeChargeStudio. I tried to
> integrate the FCKEditor, but I was not able to. Any help regarding this
will be
> greatly appreciated.
>
> Regards
> Rajesh Sivaraman.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
|