Log in or register to post comments
Last post
psykoptic's picture
Joined: 09/02/2008
Posts: 61
Re: Unable to get Modified text from Fck Editor in asp.net
Make sure you have the .NET integration assembly - FCKeditor.Net_2.6.3.zip

Its pretty straightforward - there's examples in the samples directory (\_samples\aspx\) but basically you get the value on page postback. Something like this:

    /// <summary>
    /// Update content
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click1(object sender, System.EventArgs e)
    {
        if (Page.IsValid)
        {
             string FCKContent= FCKContent.Value;

        }
    }
gopalchauhan's picture
Joined: 12/02/2009
Posts: 3
Re: Unable to get Modified text from Fck Editor in asp.net
hi Psykoptic,

Thanks for giving attention on my thread. but its not my problem for which you are providing answer.

in my scenario i have set the default value of fck editor that is "there is some sample text". after running my application i am getting that default value in fck editor. Now i have done some modification in that text ie "There is some gopal text".

Now i want this changed text in my code behind file in some variable.

HttpUtility.HtmlEncode(FCKeditor1.Value) will give the value which i have set by default as per example.

i hope now u will understand my problem and give reply asap.

regards,
Gopal Chauhan
mlasell's picture
Joined: 06/03/2009
Posts: 2
Re: Unable to get Modified text from Fck Editor in asp.net
Are you submitting the form?
If so, in a
protected void SubmitOnClick(object sender, EventArgs e)
{
string varName =HttpUtility.HtmlEncode(FCKeditor1.Value);
}
varName will hold the new value.

If you just want a javascript reading of what is curently in the form without submitting it, you would have to use a getElementById or some other page parsing.
shaulbehr's picture
Joined: 12/03/2009
Posts: 3
Re: Unable to get Modified text from Fck Editor in asp.net
I am having exactly the same problem - the FCKeditor1.Value property is blank, empty, void, nothing there.
Glad to hear it's not just me... :?
lesbarstow's picture
Joined: 07/07/2008
Posts: 185
Re: Unable to get Modified text from Fck Editor in asp.net
This has been answered over in the support forum a couple of times recently. You either need to use the UpdateLinkedField() call if doing a form copy, or use the GetHTML/GetData/GetXHTML() call to retrieve the current editor value into a variable.

oFCKeditor.Value is pretty much a set-at-load property only.