Kayako logo
Developers & Code Interested in customizing your Kayako products? Discuss modifications and develop your own mods with the community.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
nickm Offline
New Member
 
Posts: 27
Join Date: Feb 2006
Changing the Default HTMLArea to FCKeditor - 17-02-2006, 08:22 PM

From day one of instll, I hadn't been able to get HTMLArea to work. I gave up and started to look for an upgrade, only to find out they're not producing it anymore.

So, another direction - find another editor. I remembered that some time ago, I had used FCKeditor. Although it had its issues, I was able to at least use it. And then begins the long process of integration - but I eventually did it and got it to work with the Knoweldge Base articles - and here's how.

Go to http://www.fckeditor.net and download a copy. Extract it and upload it to your /includes/plugins folder beneath its own FCKeditor folder.

Then, in your themes/admin_default/cpheader.tpl, change your head code to look like this (note, this is NOT the entire code, but begins where the top line is the same.)

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><html>

<head>

<title><{$title}></title>

<meta http-equiv="Content-Type" content="text/html; charset=<{$language[charset]}>">

<link rel="stylesheet" type="text/css" media="all" href="<{$swiftpath}>staff/index.php?_ca=css" />

<script language="Javascript">
var themepath = "<{$themepath}>";
var swiftpath = "<{$swiftpath}>";
var BLANK_IMAGE="<{$themepath}>space.gif";
var swiftsessionid = "<{$session[sessionid]}>";
var swiftiswinapp = "<{$session[iswinapp]}>";
var cparea = "<{$area}>";
</script>

<script type="text/javascript" src="<{$themepath}>main.js"></script>

<{if $area eq "staff"}>

<script type="text/javascript" src="<{$localepath}>staffmenu.js"></script>

<{/if}>

<{if $calendar eq true}>
<{if $lschathistory == true || $isteamwork == true}>

<link rel="stylesheet" type="text/css" media="all" href="<{$themepath}>calendar-flatnav.css" title="win2k-1" />
<{else}>
<link rel="stylesheet" type="text/css" media="all" href="<{$themepath}>calendar-blue.css" title="winter" />

<{/if}>

<script type="text/javascript" src="<{$themepath}>calendar.js"></script>
<script type="text/javascript" src="<{$themepath}>lang/calendar-<{$languagecode}>.js"></script>
<script type="text/javascript" src="<{$themepath}>calendar-setup.js"></script>

<{/if}>

<{if $overlib eq true}>
<script type="text/javascript" src="<{$swiftpath}>includes/overLIB/overlib.js"></script>
<script type="text/javascript" src="<{$swiftpath}>includes/overLIB/overlib_exclusive.js"></script>

<{/if}>

<{if $spellcheck eq true}>

<script type="text/javascript" src="<{$swiftpath}>includes/Spellcheck/spellChecker.js"></script>

<{/if}>

<{if $jscachefile neq ""}>
<script type="text/javascript" src="<{$swiftpath}>files/<{$jscachefile}>"></script>

<{/if}>

<!-- Begin HTML editor -->

<script type="text/javascript">

<{if $htmlarea eq true}>
var _editor_lang = "en";
var _editor_url = "<{$swiftpath}>includes/FCKeditor/";
var editor = null;
     window.onload = function()
      {
        var oFCKeditor = new FCKeditor( 'contents' ) ;
        oFCKeditor.BasePath = "<{$swiftpath}>includes/FCKeditor/" ;
        oFCKeditor.ReplaceTextarea() ;
      }

<{if $htmlareanotable neq true}>var loadTablePlugin = false;<{else}>var loadTablePlugin = true;<{/if}>

<{/if}>

</script>

<{if $htmlarea eq true}>
<script type="text/javascript" src="<{$swiftpath}>includes/FCKeditor/fckeditor.js"></script>

<{/if}>

<{processCPMenu area=$area}>
<script language="Javascript">

<{if $htmlarea eq true}>HTMLArea.loadPlugin("TableOperations");<{/if}>
function loadAllData() { preloadMenuImages(); <{if $htmlarea eq true}>
  editor = new HTMLArea("contents");
  editor.registerPlugin(TableOperations);
  editor.generate();
<{/if}>

<!-- End HTML editor -->

</head>
Only one problem - doing this seems to break the drop downs under the reply functions.

Anyone care to help me debug?

Last edited by nickm; 17-02-2006 at 08:36 PM. Reason: Modification
   
Reply With Quote
  (#2) Old
nickm Offline
New Member
 
Posts: 27
Join Date: Feb 2006
29-03-2006, 05:48 PM

Edit: Be sure to also remove from the body tag the following:

onLoad="javascript:loadAllData();

Otherwise you'll run into problems.
   
Reply With Quote
  (#3) Old
ITMNETWORKS Offline
New Member
 
Posts: 12
Join Date: Aug 2007
Location: Brazil
11-08-2007, 01:21 PM

Hi,

To me not work this.

How can add fckeditor in kayako ?


---------------------------------
[]īs Rodrigo Adr Araujo
http://www.ITMNETWORKS.com.br
   
Reply With Quote
  (#4) Old
doug316 Offline
New Member
 
Posts: 2
Join Date: Apr 2008
28-04-2008, 11:45 PM

I replaced both script sections in version 3.20.02 with the following, which seems to work for me. I redefined loadAllData and the body onload still calls it. The previous window.onload call didn't work.


<script type="text/javascript">
<{if $htmlarea eq true}>
var _editor_lang = "en";
var _editor_url = "<{$swiftpath}>includes/fckeditor/";
var editor = null;
function loadAllData()
{
var oFCKeditor = new FCKeditor( 'contents' ) ;
oFCKeditor.BasePath = "<{$swiftpath}>includes/fckeditor/" ;

oFCKeditor.Config["CustomConfigurationsPath"] = "/myconfig.js" ;

oFCKeditor.ReplaceTextarea() ;
}
<{if $htmlareanotable neq true}>var loadTablePlugin = false;<{else}>var loadTablePlugin = true;<{/if}>
<{/if}>
</script>
<{if $htmlarea eq true}>
<script type="text/javascript" src="<{$swiftpath}>includes/fckeditor/fckeditor.js"></script>
<{/if}>
<{processCPMenu area=$area}>
   
Reply With Quote
Reply

Tags
default, fckeditor, htmlarea

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing default department when submitting ticket sqzdog How do I? 3 03-08-2007 01:42 PM
Changing a template to default one SoFiMaN SupportSuite, eSupport and LiveResponse 4 06-05-2007 11:13 PM
changing default template group ilion SupportSuite, eSupport and LiveResponse 0 25-01-2006 10:52 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46