如何通过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