Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-14399

Required field on HTML editor does not work on the new version of TinyMCE




      On the project layout-demo, the field of the HTML editor is required so an error message should be displayed if the user submits without any content. But, the upgrade of TinyMCE broke this behaviour.

      TinyMCE does not work pretty well in an ajax form, that's why we had to remove the editor when submitting the ajax request (see NXP-5578). With the new version, we have to keep this way of handling the editor in an ajax form but when submitting without any content, we don't have an error message warning the user that the field is required.

      By default, the editor creates a field "<p> </p>". In the previous version, this tag was removed properly when submitting the request, so the textarea was empty and the required worked fine.
      The removal was done when the event "onPostProcess" was fired, a listener is defined on this event and the tag "<p> </p>" has been deleted.
      What changed in the new version is when the editor is tagged "removed", no events are fired, so even if the listener is set, nothing happens.


          Issue Links



              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: