I am using fckeditor with asp.net. When I make an update to a page, it displays fine and it saves fine. However, if I push the button to go back to the editor, the text no longer shows itself in wysiwyg mode, but instead is wrapped in html code. If I view the source, it renders all of those extra characters as well. I have to exit the page and get back in for it to show up normally. If I save while in the html code mode, it saves <h1>header</h1><p>stuff here</p> etc to the page. Is there a setting to auto refresh so that it renders correctly when I go back to the editor?
Thanks,
Andy
Thanks,
Andy
Re: shows only html code when pushing back button
Yes... this happen to me too...
Please somebody help
Re: shows only html code when pushing back button
Please help
Re: shows only html code when pushing back button
I finally found something that worked for me. This is in ASP.NET.
In the Page_Load of the page I was going back to I added the following
Response.Cache.SetCacheability(HttpCacheability.NoCache)
The website I found this on was http://www.xtremevbtalk.com/showthread.php?t=296478
Hope this helps
Re: shows only html code when pushing back button
Re: shows only html code when pushing back button
The proposed solution does not work for us, however, due to the fact that we must be using the Back/Forward buttons and cannot interfere with the cache. Is there any alternative solution available?
Any help highly appreciated.
Cheers!
Re: shows only html code when pushing back button
After debugging the code I've comeup with following solution; when the backbutton is press the information is not refetched but it is comming from the cache, which seems to store it in a HTMLEncoded form, so when the window loads we will have to HTMLDecode the message before display it, since HTMLDecoding will not do anything to normal texts ( initial created text in the editor) we can just apply it to all content.
solution :
Add following code to file: FCKEditor\editor\fckeditor.html
window.onload = function()
{
// 25-11-2008 Han: Fixing the issue with the backbutton, when the back/forward button is hit then the html to display is
// still HTMLEncoded which will cause the control to display html control sequences in the editor.
// The easiest solution is probably to always htmldecode the value before it is beaing displayed in the editor, this can be done
// using the statement below.
// FCK.LinkedField.value=FCKTools.HTMLDecode(FCK.LinkedField.value);
FCK.LinkedField.value=FCKTools.HTMLDecode(FCK.LinkedField.value);
InitializeAPI() ; // existing code line
.......
after adding the code line you will have to make sure that the javascript is downloaded to the client, so in your browser delete the local files ( tools->internet options->delete files).
And then it should all work as expected, good luck
Han
Re: shows only html code when pushing back button
I tried simply doing this via the window unload event but it doesn't work.
Another solution would be by sending the contents of the FCK to the server and storing it somewhere so as to restore it later on. But this would only work if the user hits a submit button or something. If the user simply leaves the page then this cannot work...
Re: shows only html code when pushing back button
Brilliant! Worked a treat. Thanks Han.
I don't know where put this
I don't know where put this code.
I haven't this path and file: FCKEditor\editor\fckeditor.html
Fabio
Re: shows only html code when pushing back button
FCK.LinkedField.value=FCKTools.HTMLDecode(FCK.LinkedField.value);
This worked to me too. Thank you so much.
---
Annica
Graphic Design Brisbane
CK Editor shows HTML tags after hitting Back button in browser
Ok, I figured out how to fix this for CKEditor v 4.4.2.
This solution is for the jQuery version, but the `CKEDITOR.tools.htmlDecode` function is part of the CKEDITOR namespace.