I am using HTML::Template to create 2 forms. One form is for inputing data, and the other form is for editing the data, retreived from the database. I am using FCKeditor 2.4.3 for a textarea in each of the forms. Both forms are identical, except the edit form contains the values to be displayed in the fields.
All works fine when FCKeditor is used for new inputs. However, FCKeditor does not always work for the editing form. Meaning, sometimes the textarea with tool bar is drawn along with the data, and sometimes the form is missing the textarea with tool bar. However, when I vew source the data is there.
The following is what I am using for the edit form:
<script type="text/javascript">
var oFCKeditor = new FCKeditor('mytext');
oFCKeditor.BasePath = "/pathto/fckeditor/";
oFCKeditor.Value=<TMPL_VAR NAME="mytext">;
oFCKeditor.Create();
</script>
<TMPL_VAR NAME="mytext"> is the Perl template variable that returns the data to be displayed and/or edited.
As I said sometimes I get results and sometimes I dont. Please help!
Thanks.
All works fine when FCKeditor is used for new inputs. However, FCKeditor does not always work for the editing form. Meaning, sometimes the textarea with tool bar is drawn along with the data, and sometimes the form is missing the textarea with tool bar. However, when I vew source the data is there.
The following is what I am using for the edit form:
<script type="text/javascript">
var oFCKeditor = new FCKeditor('mytext');
oFCKeditor.BasePath = "/pathto/fckeditor/";
oFCKeditor.Value=<TMPL_VAR NAME="mytext">;
oFCKeditor.Create();
</script>
<TMPL_VAR NAME="mytext"> is the Perl template variable that returns the data to be displayed and/or edited.
As I said sometimes I get results and sometimes I dont. Please help!
Thanks.
Re: I want to display data for editing using FCKeditor
Re: I want to display data for editing using FCKeditor
Thanks for your response. I did try a different value assignment and I got the same results:
oFCKeditor.Value="<TMPL_VAR mytext>";
Where the Perl template variable, <TMPL_VAR mytext> is a valid variable that excludes the quotes within the tag brackets.
Is there a restriction on how many characters can be stored in the FCKeditor textarea field? Or a restriction on the type of character that can be returned into the FCKeditor textarea field? As I mentioned, I have no problems using FCKeditor for inputing data. It stores the data perfectly in the database. My problem is displaying the data in an editable FCKeditor textarea field.
Thanks again for your help.
Re: I want to display data for editing using FCKeditor
Re: I want to display data for editing using FCKeditor
FCKeditor is not converting the quotes, double quotes, right double quotes, and left double quotes into their respective HTML character reference. For example, double quote should be converted to " and so on. Also, I found that FCKeditor does not strip the carriage return and new line charactors.
I will need to do further investigation.
Re: I want to display data for editing using FCKeditor