how to use FCKeditor in ASP.NET 2.0??

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hey

ASP.NET 2.0

lets say I have a web page containing a FCKeditor, when this page loads it
will fill the FCKeditor with some kind of text... I'm wondering how to set
this text in the FCKeditor?

I'm also wondering how to get the text entered in the FCKedtior. I've tryed
putting a button on the web page, in the event handler I've placed a script
below. But this script don't get teh value in the FCKeditor the string
variable "test" don't get the value of the FCKeditor, it gets the value
"FredCK.FCKeditorV2.FCKeditor"

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
string test = FCKeditor1.ToString();
}
}

This is the markup of the page I'm having problems with using FCKeditor:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" ValidateRequest="false" %>
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2"
Assembly="FredCK.FCKeditorV2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<FCKeditorV2:FCKeditor id="FCKeditor1" BasePath="~/FCKeditor/"
runat="server" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Button" /></div>
</form>
</body>
</html>

Any suggestions?
 
FredCK.FCKeditorV2.FCKeditor youreditor= new
FredCK.FCKeditorV2.FCKeditor();

and then in order to get it' value in our code use:

String thevalue=youreditor.Value;
 
thanks!


Justin Kadima said:
FredCK.FCKeditorV2.FCKeditor youreditor= new
FredCK.FCKeditorV2.FCKeditor();

and then in order to get it' value in our code use:

String thevalue=youreditor.Value;
 
Keep something in mind, this may not work with Vista. The FCKeditor relies
(at least when I used it) on an html editing control that came with windows.
Vista won't be including that control as part of the OS so users on Vista
won't see the editing area.
 
That's a bad news :(


Mark Fitzpatrick said:
Keep something in mind, this may not work with Vista. The FCKeditor relies
(at least when I used it) on an html editing control that came with
windows. Vista won't be including that control as part of the OS so users
on Vista won't see the editing area.
 
Back
Top