How to validate content editable paragaraph
问题 I'm using JQuery UI draggable option to drag and drop components to content editable paragraph.My code as follows, My code as follows: $(function() { function textWrapper(str, sp, btn) { if (sp == undefined) { sp = [0, 0]; } var txt = ""; if (btn) { txt = "<span class='w b'>" + str + "</span>"; } else { txt = "<span class='w'>" + str + "</span>"; } if (sp[0]) { txt = " " + txt; } if (sp[1]) { txt = txt + " "; } return txt; } function chunkWords(p) { var words = p.split(" "); words[0] =