I did not like the old and outdated WYSIWYG editor that came with kayako and I own a licence for InnovaStudio WYSIWYG's editor and I have to say it is one of the better editors so I thought I would install it.
Created a folder in includes eg includes\wysiwyg and uploaded the Innovastudio editor
Edit cpheader.tpl and have a look for <{if $htmlarea eq true}> and make these changes
Code:
</script>
<{if $htmlarea eq true}>
<script type="text/javascript" src="<{$swiftpath}>includes/WYSIWYG/scripts/innovaeditor.js"></script>
<{/if}>
<{processCPMenu area=$area}>
<script language="Javascript">
<{/if}><{if $prvmsgshow eq true}> var x = confirm("<{$language[newprvmsgconfirm]}>"); if (x) {window.open('index.php?_m=core&_a=privatemessages&popupshow=1');}<{/if}>
<{if $refreshtime != 0}>setTimeout("refreshPage();",<{$refreshtime}>000);<{/if}>
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="<{$themepath}>bgblocks.gif">
I had to remove this line I was not sure that it was doing (if any one knows llet me know)
Code:
window.$IRS = globalirs = new IRSAutoComplete(document.getElementById('staffirs'))
You also need to make some changes to functions_html.php
PHP Code:
* Prints a WYSIWYG htmlarea area row
*/
function printhtmlAreaRow($name, $title, $value = "", $numlines = "20", $iscontenthtml = 1) {
global $_SWIFT;
if (empty($name)) {
return false;
}
$data = array();
$data[0]["value"] = '<table border="0" cellpading="0" cellspacing="0" width="98%"><tr><td align="left"><textarea class="swifttextarea" name="'. $name .'" id="'. $name .'" style="WIDTH:100%;" cols="80" rows="'. $numlines .'">'. htmlspecialchars($value) .'</textarea><script>var oEdit1 = new InnovaEditor("oEdit1"); oEdit1.width="100%"; oEdit1.height=200; oEdit1.cmdAssetManager="modalDialogShow(\'/includes/wysiwyg/assetmanager/assetmanager.php\',640,445);"; oEdit1.REPLACE("'. $name .'");</script> </td></tr></table>'.SWIFT_CRLF;
$data[0]["align"] = "left";
$data[0]["colspan"] = "2";
addHiddenField("iscontenthtml", $iscontenthtml);
printDescRow($title);
printDataRow($data);
}
/**
Thats it there are a lot of options you can pass to the editor through javascript (you might see I have added the asset manager) looks a little bit messy so will have to see if that can be cleaned up