After discovering that using (f)cksource=true in the query string didn't work to load the full source instead of the minified, I gave up for a while. But I found myself again wanting to figure out how to do this for CKEditor. I finally found a proposed method of doing this, but I must be doing something wrong because it's not working for me. The solution proposed here, http://dev.fckeditor.net/ticket/3855, is to download the code from the development trunk, because that code is not minified. I tried that and I also tried using what's in the 3.0 branch, and finally the 3.0 tag. What I did to try these was just put copy them to my local website folder with different suffixes, without removing the others. I tried referencing ckeditor_source.js and ckeditor_basic_source.js and I get the following two js errors in FF's Error Console and the editor doesn't load at all. The errors:
Error: CKEDITOR.env is undefined
Source File: http://.../ckeditor3fc/_source/core/loader.js, Line: 164
Error: CKEDITOR.replace is not a function
Source File: PageContainingEditor
Any help would be much appreciated. Perhaps the answer could be pinned to the forum, or added to the CKEditor development docs, http://docs.fckeditor.net/CKEditor_3.x/Developers_Guide? That would be pretty helpful.
Thanks.
Sun, 09/20/2009 - 02:03
#1
Re: Using full source instead of minified in 3.0
It's quite easy to deploy the editor in source codes mode( instead of the default released codes ) by the following steps:
1. The default download package doesn't contain the source codes, so instead you need to check it out from CKEditor Trunk.
2. Keep your working copy the same structure as the repository, adding the following line to your stagging html page with the 'PATH_CKEDITOR_ROOT' variable replaced by the desired location.
@sean Thanks for the advice, we'll be creating a doc page for that very soon.
CKEDITOR.replace is not a function, editor not coming
My editor page code is below,
<script src="includes/js/jquery/plugins/jquery.plugin.js"></script>
<script src="includes/js/jquery/plugins/jquery.iModal.js"></script>
<script src="includes/js/jquery/plugins/jquery.tableSelector.js"></script>
<script src="includes/js/jquery/plugins/jquery.window.js"></script>
<script src="includes/js/jquery/plugins/jquery.window-extensions.js"></script>
<link rel="stylesheet" href="includes/js/imodal/imodal.css" type="text/css" media="screen" />
<script type="text/javascript" src="includes/js/ckeditor4/ckeditor.js"></script>
<script type="text/javascript" src="includes/js/ckfinder/ckfinder.js"></script>
<textarea rows="10" id="{$editor.ElementId}" name="{$editor.ElementId}" class="InterspireEditor">
{$editor.HtmlContent}
</textarea>
<script>
function showCustField() {
ShowCustomFields('html', 'myDevEditControl', '%%PAGE%%'); return false;
}
c_fields = %%GLOBAL_CustomFieldJSON%%;
content_area = '%%GLOBAL_ContentArea%%';
editor_name = '%%GLOBAL_EditorName%%';
dynamicContentPopupPage = '%%GLOBAL_DynamicContentPopupPage%%';
ckeditor_instance = CKEDITOR.replace( '{$editor.ElementId}', {
extraPlugins : 'keywordplacer,dynamiccontent',
height:"1200",
width:"850",
skin : 'moono',
/*startupOutlineBlocks: true,*/
/*fullPage : true*/
toolbar : [ ['Source'],
['Cut','Copy','Paste','PasteText','PasteFromWord'],['Scayt'],['Find','Replace'],
['SelectAll','RemoveFormat'],
['Undo','Redo'],['ShowBlocks'],['Maximize'],
'/',
['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList'],
['Outdent','Indent'],['CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],[ 'Link','Unlink','Anchor' ],
['Image','Table','HorizontalRule'],
'/',
['dynamiccontent','keywordplacer','Styles','Format','Font','FontSize'],
[ 'TextColor','BGColor' ]
],
//
autogrow: true ,
basePath : "{$editor.AppUrl}",
UserFilesPath : "{$editor.AppUrl}"
});
CKFinder.setupCKEditor( ckeditor_instance, { basePath :
'{$editor.AppUrl}/admin/includes/js/ckfinder/', rememberLastFolder : false } ) ;
</script>
Am getting two error on fire bug and editor is not coming
"NetworkError: 404 Not Found - https://app.msgdata.com/uk/ems/admin/core/loader.js"
TypeError: CKEDITOR.replace is not a function