मैं textareas में "oninit" विकल्प का इस्तेमाल किया और काम किया:
oninit: function(editor) {
$currentTextArea.closest('form').bind('submit, invalid', function() {
editor.save();
});
}
आप onChange घटना का उपयोग करने की कोशिश कर सकते हैं, लेकिन यह फ़ायरफ़ॉक्स में ठीक से काम नहीं करता है।
मेरे पूरा कोड:
$('textarea.tinymce').each(function(){
var options = {
theme : "advanced",
skin : "cirkuit",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", theme_advanced_buttons1 :"formatselect,fontsizeselect,forecolor,|,bold,italic,strikethrough,|,bullist,numlist,|,justifyleft,justifycenter,justifyright,|,link,unlink,|,spellchecker",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
},
$this = $(this);
// fix TinyMCE bug
if ($this.is('[required]')) {
options.oninit = function(editor) {
$this.closest('form').bind('submit, invalid', function() {
editor.save();
});
}
}
$this.tinymce(options);
});
क्या आपको पहले से ही इसका समाधान मिला है? यह: http://www.tinymce.com/develop/bugtracker_view.php?id=5671 परेशान तरह का है। ऐसा लगता है कि यह अभी भी अभी भी अनसुलझा है। – Leah
@ लीह आपका लिंक काम नहीं कर रहा है। मुझे गिटहब पर रीडायरेक्ट किया गया है और कोई समस्या नहीं है # 5671। – naXa
@naXa इसे कभी न मानें। यह एक साल पहले से ही रहा है क्योंकि मैंने उस टिप्पणी/लिंक को पोस्ट किया था। यह पहले ही हटा दिया जा सकता था। आपकी प्रतिक्रिया के लिए वैसे भी धन्यवाद। – Leah