My code:
I get a an error on the
$(document).ready(function () { $('#InviteHead').ckeditor(setActionsForInvite(this)); } function setActionsForInvite(element) { var inviteTextArea = $(element).ckeditorGet(); if ($(element).attr('id') == 'InviteHead') { inviteTextArea.on('blur', doAction('#InviteHead', "blur", CONFIG.get('INVITE_HEAD'))); } } function doAction(element, event, defaultText) { if (event == "blur") { if ($(element).val() == "") { $(element).val(defaultText); } } }
I get a an error on the
var inviteTextArea = $(element).ckeditorGet();line saying: "CKEditor not yet initialized, use ckeditor() with callback."
Re: CKEditor not yet initialized, use ckeditor() with callba
So you are indeed executing setActionsForInvite and its ckeditorGet before creating the editor instance.
Re: CKEditor not yet initialized, use ckeditor() with callba
Thanks!
Re: CKEditor not yet initialized, use ckeditor() with callba
to
I put a break point inside the setActionsForInvite() and it never executes...
Re: CKEditor not yet initialized, use ckeditor() with callba