Ticket #1372: Hack-To-Fix-TinyMCE-Change-Detection-cms-gsoc-r38861.diff
| File Hack-To-Fix-TinyMCE-Change-Detection-cms-gsoc-r38861.diff, 1.9 KB (added by elijahlofgren, 6 years ago) |
|---|
-
cms/javascript/NewsletterAdmin_right.js
168 168 if(__callAfter) __callAfter(); 169 169 if(__form.notify) __form.notify('PageSaved', __form.elements.ID.value); 170 170 _AJAX_LOADING = false; 171 ApplyHacktoFixTinyMCEChangeDetection(); 171 172 } 172 173 173 174 var action = 'action_save'; -
cms/javascript/LeftAndMain.js
808 808 809 809 function hideIndicator(id) { 810 810 Effect.Fade(id, {duration: 0.3}); 811 } 812 813 // @HACK Modified code from formSubmit() in jsparty/tiny_mce2/tiny_mce_src.js to make WYSIWYG change detection work. 814 // @See: http://support.silverstripe.com/gsoc/ticket/50 815 // @TODO: Find way to call formSubmit() to fix the problem a without this hack 816 function ApplyHacktoFixTinyMCEChangeDetection() { 817 // Is it a form that has a TinyMCE instance 818 for (n in tinyMCE.instances) { 819 inst = tinyMCE.instances[n]; 820 821 if (!tinyMCE.isInstance(inst)) 822 continue; 823 824 if (inst.formElement) { 825 found = true; 826 console.log('@HACK: removing dirtyness of tinymce so change detection will work'); 827 inst.isNotDirty = true; 828 } 829 } 811 830 } 831 No newline at end of file -
cms/javascript/LeftAndMain_right.js
155 155 if(__callAfter) __callAfter(); 156 156 if(__form.notify) __form.notify('PageSaved', __form.elements.ID.value); 157 157 _AJAX_LOADING = false; 158 ApplyHacktoFixTinyMCEChangeDetection(); 158 159 } 159 160 160 161 if(ifChanged) {
