3 Replies Latest reply on Sep 9, 2016 6:16 AM by WolfShade

    CF2016: CFTEXTAREA RichText="Yes" and ColdFusion.Ajax.submitForm Not Working as Expected

    chrisb84545572

      I have two CF2016 servers and I have this same issue on both.  CF2016 is installed OOTB and I made no changes to any .js files.

       

      ColdFusion.Ajax.submitForm does post the form data to my specified URL, but the content within my CFTEXTAREA input within the form is posted as an empty string, even with content in the input.

       

      If I simply change the richtext parameter from yes to no, it works as expected.

       

      I'm not sure if it's related, but when debugging this issue, ckeditor.js is throwing an exception at line 426:  Object doesn't support property or method 'item'

      Again, I made no changes to this file or ckeditor config.js.

       

      I'm using Windows 7, IE11 (compatibility mode is enabled).  I can duplicate the problem in Chrome and FireFox.

       

      Anybody else experiencing this issue?  Is it a bug or am I missing something?

       

      Thank you,

      -Chris

        • 1. Re: CF2016: CFTEXTAREA RichText="Yes" and ColdFusion.Ajax.submitForm Not Working as Expected
          WolfShade Level 4

          I'm going to reply with something you're probably not going to like.

           

          Never, never, never, never, never, never, ever use CFFORM or any of its sub-elements like CFTEXTAREA or CFINPUT.  Ever.

           

          If you really need to have RTF input for anything, turn off (if possible) CF rich text and just download and install any third party library.  I believe that Adobe is including an old CKEDITOR library.  If you like CKEDITOR, you should grab the latest CKEDITOR library, throw it inline into your wwwroot, and use it that way with standard HTML form elements.

           

          The issue that you're experiencing is (most likely) a conflict or improperly named JavaScript variable.  Don't put yourself through the headache of trying to troubleshoot it - just go with a manual third party solution and get on with your coding.  Seriously.

           

          HTH,

           

          ^_^

          • 2. Re: CF2016: CFTEXTAREA RichText="Yes" and ColdFusion.Ajax.submitForm Not Working as Expected
            chrisb84545572 Level 1

            I fully understand your response.  I guess I was hoping that after numerous releases, Adobe would finally get their UI components to a level where they could be used without frustration and errors.  This is the nail in the coffin for me... I'll swap out my RTF editor and stick to jquery to handle saving the data.

             

            I did find my answer though.  You need to call a function included with CKEditor prior to making the async post.

             

            for ( instance in CKEDITOR.instances )
                CKEDITOR
            .instances[instance].updateElement();

            • 3. Re: CF2016: CFTEXTAREA RichText="Yes" and ColdFusion.Ajax.submitForm Not Working as Expected
              WolfShade Level 4

              chrisb84545572 wrote:

               

              I did find my answer though. You need to call a function included with CKEditor prior to making the async post.

              Oy.  SMH.

               

              I'm glad that you did manage to discover the solution.  How did you come by it, if I may ask?

               

              For whatever reason, Adobe isn't updating a lot of third-party things (like SOLR collections, CKEditor, etc.)  The same version of many third-party libraries will exist in many iterations of CF Server updates/upgrades.  I'm assuming the licensing is too expensive for Adobe to consider shrinking their margins, so they keep outdated libraries going from generation to generation.  (shrug)  They don't use it, why should they care?

               

              V/r,

               

              ^_^