Hi,
Just implemented CKeditor on my website and it looks great!
Managed to configure it all as I want it.
However, the last and most important step: read / edit /write a single file is something I
can't figure out. I've spent quite some time on this forum as well on internet searching how to do that. Found a lot of "do something like this or that" but that doesn't help me out.
I need an example of the config in the editor page that reads a single html file and save the changes after that.
I hope someone is willing to help me out with this as I realy want this to work.
Thanks a lot for anny help
JohN

CKEditor outputs HTML, so it
CKEditor outputs HTML, so it's not intended to convert or save documents to any specific file format. More on this here.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Thank you sebstefanov.
Thank you sebstefanov.
I know and understand that.
It's not my intention to convert anything.
Just load an existing html file full page (with .txt extension though), edit it and save it as the same document with the same extention.
I guess that would be possible?
CKEditor can't load or save
CKEditor can't open or save files. There is a full page function, which you can see in action here, but you seem to be asking for more, something akin to opening and saving files like you would on a desktop which CKEditor can't do.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
No I am not trying to imitade
No I am not trying to imitade a desktop application.
I understand very cleary what ckeditor is used for.
I am trying to load a file in a <textarea> and apply ckeditor after that.
The loading of the file in the <textarea> is not a problem and works well with the script I'm using.
However, as soon as I apply ckedito to the <textarea> field, the content is gone and the ínitial text'is shown.
<script language="javascript"> function getXMLHttp() { var xmlhttp; if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { alert("Browser does not support XMLHTTP!"); } return xmlhttp; } function getTextInfo() { xmlhttp1=getXMLHttp(); xmlhttp1.open("GET","mytextfile.txt",true); xmlhttp1.onreadystatechange = updateInfo; xmlhttp1.send(null); return false; } function updateInfo() { if(xmlhttp1.readyState == 4) { document.getElementById("myform").value = xmlhttp1.responseText; } } </script> <form> <textarea cols="80" id="myform" name="myform" rows="10"><p>initial text ...</p> </textarea> </form> <script type="text/javascript"> window.onload = getTextInfo; </script> <!-- when the script below is fired, the contents is gone in the <textarea> --> <script type="text/javascript"> CKEDITOR.replace( 'myform', { fullPage: true, allowedContent: true, extraPlugins: 'wysiwygarea' }) </script> <!-- -->Took me a lot of time but
Took me a lot of time but this script works nicely (also in IE)
It reeds a file from your server and puts it in a <textarea> of your form.
After loading the file, the CKeditor is activated.
The file that is loaded, is a full html file with a .txt extention
<head > <script type="text/javascript"> function getXMLHttp() { var xmlhttp; if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { alert("Your browser does not support XMLHTTP!"); } return xmlhttp; } function getTextInfo() { xmlhttp1=getXMLHttp(); xmlhttp1.open("GET","http://www.mywebsite.com/myfile.txt",true); xmlhttp1.onreadystatechange = updateInfo; xmlhttp1.send(null); return false; } function updateInfo() { if(xmlhttp1.readyState == 4) { document.getElementById("myform").value = xmlhttp1.responseText; } } </script> </head> <body> <form> <textarea cols="80" id="myform" name="myform" rows="10"><p>initial text ...</p></textarea> </form> <script type="text/javascript"> $(document).ready(function(){ getTextInfo(); }); </script> <script type="text/javascript"> CKEDITOR.replace( 'myform', { fullPage: true, allowedContent: true, extraPlugins: 'wysiwygarea' }) </script> </body>