CRM-7686 Joomla Editor Not Saving HTML

    Details

      Description

      When configuring CiviCRM to utilize a Joomla editor the editor integrates well, however changes made to HTML are not being applied to the textarea before the form is posted upon clicking "Next", "Save" or similar.

      The attached screenshots illustrate the textarea and text editor field upon submission comparing a Joomla-configured editor to the CIviCRM ckEditor. Each instance attempted the same steps:
      1. Reveal the textarea element that contains the HTML markup behind the text editor.
      2. Add text to the text editor
      3. Press "Next"
      4. Observe textarea element for changes prior to page reload

      While I cannot isolate the problem myself nor offer a suggestion on fixing it, I suspect it has to do with JavaScript that would normally post the HTML of the text editor to the textarea field before submitting the form.

        Attachments

          Activity

          [CRM-7686] Joomla Editor Not Saving HTML
          Brian Shaughnessy added a comment -

          Nathan,
          can you try applying the patches here:
          http://issues.civicrm.org/jira/browse/CRM-7423

          and let me know if it resolves the issue.
          if not, also let me know what joomla editor you're using

          Nathan West added a comment -

          Brian

          I had already tried that patch. It solved the problem with the tokens not applying, but it didn't solve the problem with saving.

          Brian Shaughnessy added a comment -

          I dug into this some more and don't think its really an issue. Here's what I note:

          • in your screenshots you have the textarea field displayed above the editor box. that threw me off, as a standard installation would not have that. the textarea field (which actually stores the html values) is hidden. when you edit in the editor, it constructs the html and copies it to this field.
          • the only way i could reproduce your scenario is by altering the css so that the textarea field is visible (just did this in firebug). when i do this i note:
            • when i make edits in the editor and click next, the html is constructed and copied to the textarea field. this is the expected behavior
            • when i make edits in the textarea field they are not copied to the editor. this too is expected

          it's expected because the purpose of the editor is to control the content of the textarea field, not vice versa. if you want to edit the html, you should use the builtin editor tools (see the "html" button in the tinymce editor you're using). not attempt to directly alter the hidden field.

          as to why the hidden field is even visible – that's not normal or expected. so i can only assume that you've altered your site css to display it.

          as to why ckeditor handles this process a bit differently and allows bidirectional input – my guess is that because civicrm implements those editors directly, there's a bit more nuanced handling. in the case of the joomla editor, we are making use of the Joomla methods to insert the editor and have it work with the civi fields (and thus make use of the additional functionality and flexibility provided by Joomla, such as user-specific editor selections and tools for configuring the editor options). so in some sense the implementation is more generalized, and thus less nuanced.

          if i'm misunderstanding the steps to reproduce, let me know.

            People

            • Assignee:
              Brian Shaughnessy
              Reporter:
              Nathan West

              Dates

              • Created:
                Updated:
                Resolved: