Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I insert data to database, from ckeditor.
Posted
Updated 14-Nov-14 4:16am
v2
Comments
Sinisa Hajnal 14-Nov-14 8:07am    
You can't. You can take editor result and save it into your database from your application, but other then providing HTML decoration it is still only an input box. You wouldn't ask how to save data to database from input or div element...would you?

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,

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


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.
 
Share this answer
 
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900