|
Title: $.messager.prompt with miltiline input Post by: Coder on March 01, 2023, 11:18:23 PM Code: $.messager.prompt({ title: ' new Note', msg: '', fn: function(r){ if (r){ alert(r);} }); $(".messager-window .messager-input") .textbox({width:260,height:100,multiline: true}) .textbox('textbox').focus(); PROBLEM IS : the 'r' returns filtered value without "\n" :( jQ hooks didn't work Code: $.valHooks.textarea = { get: function( elem ) { return elem.value.replace( /\r?\n/g, "\n" ); } }; Additional: how to do to "return false" in fn(r) to prevent to close prompt ? |