Jquery validation and TinyMCE 4.0.1 -


since updated tinymce version 4.0.1 jquery validation not longer working. in version 3.x, script works without problems. can use onchange_callback function @ ...?

has had idea or same problem before?

my tinymce config:

tinymce.init({     language : "de",           mode : "textareas",     theme : "modern",     height: 250,      statusbar : false,     relative_urls : false,       // update validation status on change     onchange_callback: function(editor) {         tinymce.triggersave();                   $("#" + editor.id).valid();          },      // theme options             ...  </script> 

my validation code:

    $(document).ready(function() {          // update underlying textarea before submit validation                   tinymce.triggersave();      ...     ...  validator.focusinvalid = function() {         // put focus on tinymce on submit validation             if( this.settings.focusinvalid ) {             try {                 var tofocus = $(this.findlastactive() || this.errorlist.length && this.errorlist[0].element || []);                 if (tofocus.is("textarea")) {                     tinymce.get(tofocus.attr("id")).focus();                 } else {                     tofocus.filter(":visible").focus();                 }                            } catch(e) {             }                    } 

changes in tinymce 4 detected config

tinymce.init({     ...     setup: function(editor) {         editor.on('change', function(e) {             console.log('change event', e);         });     } }); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -