Hi, How can I add some javascript callbacks to Wicket-Bootstrap # Summernote Editor configuration, like the following
$(document).ready(function () { $('.summernote').summernote({ callbacks: { onKeydown: function (e) { var t = e.currentTarget.innerText; if (t.trim().length >= 400) { //delete key // if (e.keyCode != 8) // e.preventDefault(); } }, onKeyup: function (e) { var t = e.currentTarget.innerText; $('#maxContentPost').text(400 - t.trim().length); }, onPaste: function (e) { var t = e.currentTarget.innerText; var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text'); e.preventDefault(); var all = t + bufferText; document.execCommand('insertText', false, all.trim().substring(0, 400)); $('#maxContentPost').text(400 - t.length); } } }); }); Thanks for your help François --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org