CKeditor and auto save with Coldfusion

Im trying to use CKeditor to make changes on a page, at the same time I would like it to autosave the information in to the database. I found this code online (uses FDKeditor) but when I add the Ckeditor, it does not replace the old FDKeditor. But what I would really like is to use the CKeditor inline feature if that is possible. Is there something Im missing with this code or Is there a code already out there that has the CKeditor inline feature?

<html>
	<head>
       
		<script type="text/javascript">
			function autoSave(){
				ColdFusion.Ajax.submitForm("auto", "autoSaveAction.cfm", setSaveTime);
				autoSaveEvery(10000);
			}
			function autoSaveEvery(ms) {
				var timeout=setTimeout("autoSave()",ms);
			}
			function setSaveTime(res) {
				if (res) {
					document.getElementById('messageArea').innerHTML = 'Autosaved at ' + nowFormated();
				}
			}
			function nowFormated(){
				var now = new Date();
				var ampm = "AM";
				var hour = new Number(now.getHours());
				if (hour > 12) {
					ampm = "PM";
					hour = hour - 12;
				} else if (hour == 0) {
					hour = 12;
				}
				var minutes = new Number(now.getMinutes());
				if (minutes <= 9) {
					minutes = "0" + minutes;
				}
				var seconds = new Number(now.getSeconds());
				if (seconds <= 9) {
					seconds = "0" + seconds;
				}
				return hour + ":" + minutes + ":" + seconds + " " + ampm;
			}
		</script>
        
<!--- Calls on the CKEditor --->
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<!--- /Calls on the CKEditor --->
        
	</head>
        
	<body onLoad="autoSaveEvery(10000)">
        
<div id="messageArea"></div>
        
<cfform name="auto" id="auto">
                 
<cftextarea richtext="true" 
<!--- toolbar="Basic" ---> 
name="entry">
</cftextarea>
            
<!---  CKeditor --->
<script type="text/javascript">
	CKEDITOR.replace( 'entry' );
</script>
<!--- / CKeditor --->

</cfform>
        
		<br><br>
		<cfoutput>
			<a href="autoSaveView.cfm?#createUUID()#" target="_blank">View Saved Data</a>
		</cfoutput>
        
	</body>
</html>

Open in new window

overcolorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

c lCommented:
have you thought about using the ckEditor autosave plugin?

http://ckeditor.com/forums/Plugins/Autosave-Manual-Save-AJAX

all you need to do point it to your server-side script which'll handle the saving portion
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
overcolorAuthor Commented:
I was looking create my own code because I will need to add this in other areas, I just needed a starting point.
0
c lCommented:
why reinvent the wheel in this case whe there's already a plug-in that does what you want?
0
overcolorAuthor Commented:
I was looking for something like this, Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.