TinyMCE editor
Posted: 27 Aug 2008, 15:38
by catser
The editor used when adding a Job Order in CATS version 9.1 is TinyMCE. The implementation only offers a limited number of functions/options (buttons) available, eg. lacking font size settings. Does anyone know how and where I could add additional editing functions/options?
Re: TinyMCE editor
Posted: 27 Aug 2008, 19:42
by ronald
Here's a few alternatives, I'm afraid most of them require some coding in CATS to implement:
FCKeditor:
http://www.fckeditor.net/ (demo:
http://www.fckeditor.net/demo)
NicEdit:
http://nicedit.com/index.php (demo:
http://nicedit.com/demos.php)
Openwysiwyg:
http://www.openwebware.com/ (demo:
http://www.openwebware.com/wysiwyg/demo.shtml)
MarkItUp is not so much a wysiwyg editor, but worth looking at:
http://markitup.jaysalvat.com/home/
Re: TinyMCE editor
Posted: 28 Aug 2008, 05:02
by Jos
You could edit the init file at cats/lib/tinymce/jsscripts/tiny_mce/.. all the advanced features are allready installed, you just need to configurate them. It is tinymce version 2.1
Re: TinyMCE editor
Posted: 29 Aug 2008, 09:28
by catser
Thank you for your swift replies. It is a warm feeling knowing that one is not alone with CATS.
Would you know where I could find the TinyMCE.init? The only reference to TinyMCE I found is in /modules/joborders/Add.tpl. In tiny_mce.js nor in the advanced theme template /lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js can I find configurations settings matching those in CATS.
However, viewing the generated code I see the following, but where the heck is it located?
<script language="javascript" type="text/javascript" src="lib/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">tinyMCE.init({
mode : "specific_textareas",
editor_selector : "mceEditor",
width : "100%",
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,separator,underline,forecolor,separator,removeformat,cleanup,separator,charmap,separator,undo,redo",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
/catser
Re: TinyMCE editor
Posted: 29 Aug 2008, 12:14
by RussH
catser wrote:
However, viewing the generated code I see the following, but where the heck is it located?
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,separator,underline,forecolor,separator,removeformat,cleanup,separator,charmap,separator,undo,redo",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
/catser
<snip>
I think that's from ./lib/TemplateUtility.php;
Code: Select all editor_selector : "mceEditor",
width : "100%",
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,separator,underline,forecolor,separator,removeformat,cleanup,separator,charmap,separator,undo,redo",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
language : "en",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_resizing : true,
browsers : "msie,gecko,opera,safari",
dialog_type : "modal",
theme_advanced_resize_horizontal : false,
convert_urls : false,
relative_urls : false,
remove_script_host : false,
force_p_newlines : false,
force_br_newlines : true,
convert_newlines_to_brs : false,
remove_linebreaks : false,
fix_list_elements : true
Re: TinyMCE editor
Posted: 30 Aug 2008, 12:54
by catser
That did the trick. Thank you RussH, Jos, ronald for you help. This will bring a big smile to our opencats users coming monday.
//catser
Re: TinyMCE editor
Posted: 31 Aug 2008, 05:35
by Jos
Russh,
We should replace the 2.1 code within cats with the new release of tinymce 3.1. It is far more advanced. Set me up for the SVN, so that I can start working on that part.