28,390
社区成员
发帖
与我相关
我的任务
分享
<form class="form-horizontal" action="?act=editapps&u_id=<%=rs("a_id")%>" method="post" name="editapps" role="form">
<tr>
<td class="col-md-2"><label class="control-label" for="a_content">应用简介</label></td>
<td class="col-md-10"><div id="summernote"><%=rs("a_content")%></div></td>
</tr>
<tr>
<td class="col-md-2"><label class="control-label"></label></td>
<td class="col-md-10"><button type="submit" class="btn btn-lg btn-primary btn-block">修改</button></td>
</tr>
</form>
get & set Code
Get the HTML contents of the first summernote in the set of matched elements.
var markupStr = $('#summernote').summernote('code');
If you initialize multiple editor, You can get the HTML content of the second summernote with jQuery eq.
var markupStr = $('.summernote').eq(1).summernote('code');
A string of HTML to set as the content of each matched element.
var markupStr = 'hello world';
$('#summernote').summernote('code', markupStr);
$(document).ready(function() {
var a_content = $('#summernote').summernote('code');
$('#summernote').summernote({
height: 100,
minHeight: null,
maxHeight: null,
focus: true,
lang: 'zh-CN'
});
var code = $("#editor").code();
$("#essayText").val(code);
if($("#essayCategory").val() === '') {
return;
}
$("#add_form").submit();