From: Coleman Watts Date: Tue, 10 Feb 2015 19:15:03 +0000 (-0500) Subject: CRM-15939 - Fix richTextEditor in contact inline-edit X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7aa3a631943cb5ba7587d9dd4c930c3e63eee648;p=civicrm-core.git CRM-15939 - Fix richTextEditor in contact inline-edit --- diff --git a/templates/CRM/Contact/Page/View/Summary.js b/templates/CRM/Contact/Page/View/Summary.js index 2680b9aa89..c4ee0beb80 100644 --- a/templates/CRM/Contact/Page/View/Summary.js +++ b/templates/CRM/Contact/Page/View/Summary.js @@ -1,11 +1,25 @@ // http://civicrm.org/licensing (function($, _) { + // FIXME: Much of this code is redundant with CRM.loadForm var ajaxFormParams = { dataType:'json', beforeSubmit: function(arr, $form, options) { $form.block(); }, + beforeSerialize: function(form, options) { + // Copied from crm.ajax.js + if (window.CKEDITOR && window.CKEDITOR.instances) { + $.each(CKEDITOR.instances, function() { + this.updateElement && this.updateElement(); + }); + } + if (window.tinyMCE && tinyMCE.editors) { + $.each(tinyMCE.editors, function() { + this.save(); + }); + } + }, success: requestHandler, error: errorHandler };