Looking forward to test Yoast Drupal :)
I'm using the WYSIWYG module and CKEditor, but the CKEditor detection function is causing trouble.
ReferenceError: detectCKEditorInstances is not defined
detectCKEditorInstances();
yoast_s...?nv7221 (regel 89, kol 12)
You should probably define the function outside of the body.once scope and put in in docReady scope or global scope, like the other functions.
Comments
Comment #2
bramtenhove commentedI'll take a look into this!
Comment #3
nexoro commentedThanks! Solved this by putting the function outside the scope of document ready like suggested.
Made the variable maxDetectTries global (window.maxDetectTries).
Comment #4
jurriaanroelofs commentedHere's a patch that solves this problem and also retains proper variable scope.
I hope you don't mind I also changed the polling interval from 25ms to 250ms because I noticed that without an CKEditor present the polling caused the javascript interpreter to put a noticeable load on my processor during the 2.5 seconds where it's also needed for a lot of other stuff.
Comment #5
bramtenhove commentedI agree with changing the polling interval, good idea.
Will try your patch and commit it.
Comment #6
robertragas commentedI have tried the patch and the console error is gone, but when using the snippet editor the text changes to undefined when I release the focus on the snippet editor.
I am using firefox.
Comment #7
marcoka commentedi can confirm this error. used latest dev versions of media/ckeditor and file_entity
Comment #8
marcoka commentedchanged the line with patch
if (typeof CKEDITOR != "undefined" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances.length != 0 && maxDetectTries > 0) {
i still have the error in my firefox sonole.
Comment #9
marcoka commentedthis patch also fixes thsi issue for me #2574277: ReferenceError: detectCKEditorInstances is not defined
Comment #10
niels de ruijter commentedComment #11
niels de ruijter commentedSorry about the spam.
Comment #12
niels de ruijter commentedTested the patch.
Unfortunately the patch breaks the snippet editor in some cases, yet to figure out what breaks it exactly. After the patch everything in the CKEditor works like expected on all browsers including Firefox (42.0).
Comment #13
Funksmaname commentedpatch worked for me thanks! (FF 42.0)
Comment #14
niels de ruijter commentedThe whole detectCKEditorInstance function can be replaced with a simple event listener. It takes care of any errors, but the DrupalSource.triggerEvent on seems to result in nothing though. It does get executed, but the summary doesn't update.
Comment #15
robertragas commentedThis patch of Jurriaan in combination with the patch on https://www.drupal.org/node/2636836 ( for the snippet editor ) will fix the firefox problems. Will commit it.
Comment #17
robertragas commented