Question
How to easily integrate the FCK Editor for editing pages without using a plugin?
Environment
--
CatalinNacu - 22 Oct 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
This assumes a standard installation following the Install Docs with no further customization.
Download the latest stable version of FCK Editor and unzip it to a directory called "FCKeditor" in the root of your web server.
Backup the file twiki/templates/edit.pattern.tmpl
Change the following section:
%TMPL:DEF{"templatejavascript"}%
%TMPL:END%
ie - you need to add the FCK related stuff.
This will enable the FCK Editor when pressing the standard Edit button.
--
CatalinNacu - 22 Oct 2007
whoops..; here it goes again:
%TMPL:DEF{"templatejavascript"}%<script type="text/javascript" src="%PUBURLPATH%/%TWIKIWEB%/TWikiJavascripts/twiki_edit.js"></script>
<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'text' ) ;
oFCKeditor.BasePath = "/FCKeditor/" ;
oFCKeditor.Height = "600" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
%TMPL:END%
--
CatalinNacu - 22 Oct 2007
..this seems to break the wiki syntax parsing however..
--
CatalinNacu - 22 Oct 2007
Has anyone resolved the problem?
--
ChengZhiHui - 02 Nov 2007
Without using a plugin? Why?
--
CrawfordCurrie - 03 Nov 2007
Sorry, closing this question after more than 30 days of inactivity. Please feel free to re-open if necessary.
--
PeterThoeny - 11 Dec 2007