Users must click "Back" twice when using WYSIWYG

2 posts by 2 authors in: Forums > Off Topic / Other
Last Post: February 8, 2005   (RSS)

By Giskard - February 8, 2005


After attempting to modify the initIframe() function in the "HTMLArea.prototype.generate" prototype, I've noticed that when the content is written to the iFrame, it essesntially creates a browser history item.

The problem this creates is that if a user that wants to go to the previous page (by hitting "Back" in their browser) they must click "Back" twice. The first click unloads the WYSIWYG data; the second returns to the previous URL.

Does anyone have any ideas for a workaround?

Here's the code:
if (!editor.config.fullPage) {;
var html = "<html>\n";
html += "<head>\n";
if (editor.config.baseURL)
html += '<base href="' + editor.config.baseURL + '" />';
html += "<style>" + editor.config.pageStyle +
" html,body { border: 0px; }</style>\n";
html += "</head>\n";
html += "<body>\n";
html += editor._textArea.value;
html += "</body>\n";
html += "</html>";
} else {

Thanks is advance!