你好,这是我的代码,但我在我的ckeditor中看不到我的查询数据,你能帮我吗
函数mostrar{$.post("../ajax/editor.php?op=mostrar",{idnoticia:idnoticia},功能(数据、状态({data=JSON.parse(数据(;mostrarform(true(;var Dto=data.editor;
CKEDITOR.instances.myeditor.setData(Dto);
$("#titulo").val(data.titulo);
$("#descripcion").val(data.descripcion);
$("#departamento").selectpicker('refresh');
$("#fecha_hora").val(data.fecha_hora);
$("#idnoticia").val(data.idnoticia);
})
}
这是表格
<textarea class="form-control" id="myeditor" name="myeditor"></textarea>
</form>
<script type="text/javascript">
CKEDITOR.replace( 'myeditor', {
height: 300,
filebrowserUploadUrl: " ajaxfile.php?type=file",
filebrowserImageUploadUrl: "ajaxfile.php?type=image"
} );
</script>
试试这个,
app.get('/profileface', isLoggedIn, function(req, res) {
// mongoose operations are asynchronous, so you need to wait
PracticeModel.find({}, function(err, data) {
// note that data is an array of objects, not a single object!
res.render('profileface.ejs', {
user : req.user,
practices: data
});
});
});