I am new to CKEditor and trying to implement it in a PHP/HTML site I am working on.
Currently when my page loads I get a javascript error on the console with the following stacktrace:
Uncaught TypeError: undefined is not a function filter.js:388 addNamedRules filter.js:388 CKEDITOR.htmlParser.filter.CKEDITOR.tools.createClass.proto.addRules filter.js:143 CKEDITOR.htmlDataProcessor htmldataprocessor.js:43 initComponents editor.js:391 onConfigLoaded editor.js:385 (anonymous function) editor.js:306 listenerFirer event.js:144 CKEDITOR.event.fire event.js:289 CKEDITOR.editor.fire editor_basic.js:24 CKEDITOR.event.fireOnce event.js:332 CKEDITOR.editor.fireOnce editor_basic.js:31 loadConfig editor.js:266 (anonymous function) editor.js:281 callbackWrapper scriptloader.js:185 CKEDITOR.scriptLoader.load.doCallback scriptloader.js:68 CKEDITOR.scriptLoader.load.checkLoaded scriptloader.js:84 CKEDITOR.scriptLoader.load.onLoad scriptloader.js:98 (anonymous function) scriptloader.js:134
I am using the following HTML code to generate my CKEditor instance.
<td><p><textarea name="eventdescription" id="eventdescription" cols="80" rows="10"><%fld_eventdescription%></textarea></p> <span class="reqfield">*</span></td> <script> // Replace the <textarea id="eventdescription"> with an CKEditor // instance, using default configurations. CKEDITOR.replace( 'eventdescription', { uiColor: '#14B8C4', toolbar: [ [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ], [ 'FontSize', 'TextColor' ] ] }); </script>
I have tried several version of CKEditor including the latest development release, nightly builds and a few older versions of CKEditor 3.X, all give the same error. I get this error regardless of whether or not I try to load CKEditor via class name or through CKEDITOR.replace().
Samples Work Fine`
The samples at /ckeditor/samples/ work fine and appear as expected. Yet still nothing on any of my other pages.
*Couldn't update the previous post because of the spam filter*
*Solution*
The error turned out in this case to be a conflcit with JSON.js which was in use with another part of the website. JSON.js was commented out and this worked fine.