How can I point to a custom config file so the default one is not used? I tried to find this and the info in the Documentation did not seem to work. Possibly this is because I am using my editor within a div element instead of a textarea, or that I was not using the code correctly.
I am using CKeditor 4.4.4 and am also using the editor within a div instead of a textarea.
If anyone knows how to do this please let me know what code to code and where to place it. I have found many examples on google and have found nothing in the forum or the documentation that works.
Below is what I recently tried and did not seem to override the config file in the ckeditor folder, the code is placed within the same file that creates the editor and the custom config file is within the same folder...
CKEDITOR.replace( 'editor1', {
customConfig: 'config.js'
});
customConfig takes a path
customConfig takes a path relative to CKEditor's main directory, not the directory in which you keep the HTML file (because it may simply not exist in real).
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Hi thanks for trying to help.
Hi thanks for trying to help. I tried what I think you mean and it did not work, it is still is using the default config file. If you are so sure this works can you please show an example of how to use the code? What I assume you are telling me to do is to change the path of the file in the code that I pasted above with the thought that it will be starting from the ckeditor folder, so in my case I will have to back out of that folder, and go into a different folder where the file actually lives that I want to use. If I am wrong on what you are trying to explain please let me know. In FCK editor it was very easy to do this and it worked. Maybe there is something wrong with the code I am using other than the path of the file? Maybe take another look at the code I pasted above
Open the developer console in
Open the developer console in your browser, switch to the network tab (sometimes called resources) and you'll see there a path from which config.js is or isn't (if it's a wrong path) downloaded. You'll also see a 404 error usually. Based on that you will be able to write the path correctly.
Of course many other things could go wrong too, but for that you need to check the JS console.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Ok tried that, using IE and
Ok tried that, using IE and in the dev tools I see that the config.js supplied with ckeditor is loaded even though I have the custom config code in place. I updated my code to try and load a different config file called "config2.js" which is located in the same folder as the default config file, and it still will not load that file instead of the default file. Obviously I am doing something wrong,
I tried using a textarea instead of a div and was finally able to get the custom config file to load. So now I just need to figure out how to get it to load for the div editor. If you might know the solution please advise. And thank you again for assisting me
I'm not sure if I understand
I'm not sure if I understand correctly, but if you try to create an inline editor, thn check out the inline editor by code sample. It seems that the editor is created automaticall (it happens when element has a contenteditable=true attribute) and then you can't specify the config. Also, if you indeed try to use inline editor, then you must use CKEDITOR.inline instead of CKEDITOR.replace. But please ignore this message if you want the classic editor (like the one on this forum).
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
I think I got it to work, but
I think I got it to work, but now I get some stuff implanted into my editor. I pasted what it is below. Any idea why that is getting in there when I point to the custom config file? Its the same config file only renamed and I stripped some stuff out of the toolbar so I would be able to tell if it was using it or not.
Rich Text Editor, editor1Editor toolbars Save Personalization Cut Copy Paste Undo Redo Bold Italic Underline Strike Through Superscript Subscript Insert/Remove Numbered List Insert/Remove Bulleted List Increase Indent Decrease Indent Align Left Center Align Right Add/Edit Browser Link Add/Edit Application Link Add/Edit Question Set Default Link Delete Link Question Comprehension Check Editorâ–²Press ALT 0 for help