这是编辑器中动态设置值的代码:
$statusui_edit="<div type='".$updateid."' class='hidden_edit_4_session session_editor".$updateid." jumbotron'>"
. "<a href='#' type='".$updateid."' class='pull-right close_edit' title='Close without editing'>Close X</a>"
. "<input type='text' class='form-control title_s_edit title_s_".$updateid."' name='status_title' value='".html_entity_decode($title)."' placeholder='Title' >"
. "<div> </div>"
. "<textarea id='wall_edit_1' type='".$updateid."' rows='5' cols='50' class='session_edit text_value_".$updateid."' wrap='hard' placeholder='whats up ".$session_uname."'>
".html_entity_decode($data)."</textarea><br>"
. "<button style='float:right;' attrid='".$updateid."' type='a' class='btn btn-warning btn btn-large btn-lg post-s-edit'>Update</button></div>";
这是我用来编辑tinymce编辑器的值的jquery代码:
$(".post-s-edit").click(function(){
var attrid=$(this).attr('attrid');
var title= $(".text_s_"+attrid).val();
var data=$(".text_value_"+attrid).val();
alert(title);
alert(data);
/*$.post(
"status/update_status_ajax.php",
);*/
});