jimsanghvi@hotmail.com Posted January 15, 2012 Share Posted January 15, 2012 Dear All : I install ckeditor and there is a folder _sample in that there is a file fullpage.html . I made changes to text in text area and clicked on save button , but it did not save . Want i want to do is when save button is clicked the page open for editting say for example index.html . then on save button click it should make changes to index.html page on page refresh Quote Link to comment https://forums.phpfreaks.com/topic/255081-html-editor-problem/ Share on other sites More sharing options...
joel24 Posted January 15, 2012 Share Posted January 15, 2012 You need to write some PHP / Java etc to modify a file on your hard drive, the ckeditor sample is just a sample of the text editor's features. Quote Link to comment https://forums.phpfreaks.com/topic/255081-html-editor-problem/#findComment-1307957 Share on other sites More sharing options...
jimsanghvi@hotmail.com Posted January 16, 2012 Author Share Posted January 16, 2012 Say for eg i have hosted my website on godaddy . Now for eg there is a web page index.html . now i install the folder of ckeditor on godaddy . Now say i open the web page for eg www.marte.com/index.html in ckeditor and make the change and save it . Then when i refresh the index.html that is www.marte.com/index.html while the change reflect or do i need to publish or it will automatically save the changes and reflect it On button click the change should reflect will this be done through php or javascript Quote Link to comment https://forums.phpfreaks.com/topic/255081-html-editor-problem/#findComment-1308119 Share on other sites More sharing options...
joel24 Posted January 17, 2012 Share Posted January 17, 2012 javascript will not be able to edit the file, you need to run a PHP script to edit the file. I was talking about java (not javascript) for use on your HDD, though PHP would be the easiest choice. Use php. Are you trying to edit the entire web-pages HTML and then save it - or just some text? Use file_get_contents() to retrieve the file's HTML, echo it into the ckeditor textarea, edit it, and when you post it back use file_put_contents() to write the file Quote Link to comment https://forums.phpfreaks.com/topic/255081-html-editor-problem/#findComment-1308417 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.