Integrating multiple FCKeditors in SGL

Table of Contents

  1. Concept
  2. Conclusion:

Concept

This works in HTML to make more than one textarea replaced by FCKeditor:

    <script type="text/javascript">
    function fck_init()
    {
        var oFCKeditor = new FCKeditor('frmBodyName[en_iso_8859_15]') ;
        oFCKeditor.BasePath = SGL_JS_WEBROOT + "/fck/";
        oFCKeditor.ReplaceTextarea() ;
        var oFCKeditor2 = new FCKeditor('frmBodyName[de_iso_8859_1]') ;
        oFCKeditor2.BasePath = SGL_JS_WEBROOT + "/fck/";
        oFCKeditor2.ReplaceTextarea() ;
    }
    </script>

Where the textareas are:

<tr>
<th>BodyHtml en_iso_8859_15</th>
<td><textarea id='frmBodyName[en_iso_8859_15]' cols='75' rows='20' name='frmBodyName[en_iso_8859_15]'>English foobar<br/></textarea><input type='hidden' name='frmBodyItemID' value='3' /></td>
</tr>
<tr>
<th>BodyHtml de_iso_8859_1</th>
<td><textarea id='frmBodyName[de_iso_8859_1]' cols='75' rows='20' name='frmBodyName[de_iso_8859_1]'>german foobar</textarea></td>
</tr>

Conclusion:

  • every textarea has to has its own id similar to its name.
  • it has to be generated by javascript in the head

see patch http://sourceforge.net/tracker/index.php?func=detail&aid=1262938&group_id=92482&atid=600782