如何通过Ck编辑器将数据插入数据库 [英] How Can I Insert Data To Database Through Ck Editor

查看:142
本文介绍了如何通过Ck编辑器将数据插入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从ckeditor向数据库插入数据。

How can I insert data to database, from ckeditor.

推荐答案

您需要从编辑器中获取数据(内容),然后将其保存在数据库中。



来自他们的文件 [ ^ ],您可以使用此代码,



You need to get the data (content) from the editor and then save that in your database.

From their documents[^], you can use this code,

// editor1 is the instance ID of the editor. 
var data = CKEDITOR.instances.editor1.getData();





现在,您可以使用代码中的可变数据将内容发送到服务器并保存。您可以使用POST请求,或使用Ajax发送数据等等。你应该去看看这些文件并阅读更多内容。



Now once taken, you can use the variable data in your code to send the content to the server and save it. You can use POST requests, or the Ajax to send the data and so on and so forth. You should go to the documents and read more on this.


确定这个解决方案还有一件事,如果我想从数据库获取数据到水晶报告那么我必须做什么.. ........... plz用代码
ok thnks for this solution one more thing if i want to get data from database to crystal report then what i have to do .............plz describe it diply..plz with code

这篇关于如何通过Ck编辑器将数据插入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆