|
|
@ -36,7 +36,8 @@ function sd_create_editor(params){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//params.toolbar_container.hide();
|
|
|
|
//params.toolbar_container.hide();
|
|
|
|
$('#reply_image_' + id).addClass('imageFuzzy');
|
|
|
|
$('#reply_image_' + id).addClass('imageFuzzy');
|
|
|
|
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
|
|
|
|
// /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html()))
|
|
|
|
|
|
|
|
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html()) && $(".upload_filename").length == 0 ){
|
|
|
|
params.submit_btn.hide();
|
|
|
|
params.submit_btn.hide();
|
|
|
|
params.toolbar_container.hide();
|
|
|
|
params.toolbar_container.hide();
|
|
|
|
this.resize("100%", null);
|
|
|
|
this.resize("100%", null);
|
|
|
@ -209,13 +210,17 @@ function sd_check_editor_form_field(params){
|
|
|
|
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
|
|
|
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
|
|
|
params.textarea.html(params.content.html());
|
|
|
|
params.textarea.html(params.content.html());
|
|
|
|
params.content.sync();
|
|
|
|
params.content.sync();
|
|
|
|
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){
|
|
|
|
if(
|
|
|
|
params.contentmsg.html('内容不能为空');
|
|
|
|
(params.content.isEmpty() && $(".upload_filename").length == 0)
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())&& $(".upload_filename").length == 0)){
|
|
|
|
|
|
|
|
params.contentmsg.html('请填写评论内容或者上传附件!');
|
|
|
|
params.contentmsg.css({color:'#ff0000'});
|
|
|
|
params.contentmsg.css({color:'#ff0000'});
|
|
|
|
}else{
|
|
|
|
|
|
|
|
params.contentmsg.html('填写正确');
|
|
|
|
|
|
|
|
params.contentmsg.css({color:'#008000'});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// else{
|
|
|
|
|
|
|
|
// params.contentmsg.html('填写正确');
|
|
|
|
|
|
|
|
// params.contentmsg.css({color:'#008000'});
|
|
|
|
|
|
|
|
// }
|
|
|
|
params.contentmsg.show();
|
|
|
|
params.contentmsg.show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -281,6 +286,7 @@ function sd_create_editor_from_data(id){
|
|
|
|
});
|
|
|
|
});
|
|
|
|
params.submit_btn.click(function () {
|
|
|
|
params.submit_btn.click(function () {
|
|
|
|
var tContents = $("#comment_news_" + id).val();
|
|
|
|
var tContents = $("#comment_news_" + id).val();
|
|
|
|
|
|
|
|
console.log("tcontrnet"+tContents);
|
|
|
|
if(tContents != undefined){
|
|
|
|
if(tContents != undefined){
|
|
|
|
var beforeImage = tContents.split("<img");
|
|
|
|
var beforeImage = tContents.split("<img");
|
|
|
|
var afterImage = tContents.split("/>");
|
|
|
|
var afterImage = tContents.split("/>");
|
|
|
|