Summernote event for switch from code view to editor
问题 I use google caja html sanitizer to prevent script executions on client side. So I need to put event on switch from code view to editor, and in that event I would clean html. Since there is no any event for that switch I wrote something like this: $('#newFeaturesView .note-editor .btn-codeview').click(function () { if (!$(element).hasClass('active')) { var html = $('#summernote').summernote('code'); var sanitizedHtml = html_sanitize(html, urlTransformer, classIdTransformer); $('#summernote')