--- fckeditor.popup.html.orig 2009-09-10 19:58:40.000000000 +0000
+++ fckeditor.popup.html 2009-09-10 21:25:59.000000000 +0000
@@ -46,18 +46,22 @@ function Ok()
if (FCKURLParams[ 'teaser' ]) {
var text = oEditor.GetData( true );
- var t = text.indexOf('');
var textarea = window.opener.document.getElementById( FCKURLParams[ 'el' ] );
var teaser = window.opener.document.getElementById( FCKURLParams[ 'teaser' ] );
- console.debug(teaser.parentNode.style.display);
+ var t = text.indexOf('');
// for now, do nothing when the body field is in joined mode
- if(t != -1 && teaser.parentNode.style.display != 'none') {
- teaser.value = FCKeditor_trim(text.slice(0,t));
- textarea.value = FCKeditor_trim(text.slice(t+12));
- } else {
- teaser.value = '';
+ if(teaser === null) {
textarea.value = text;
}
+ else {
+ if(t != -1 && teaser.parentNode.style.display != 'none') {
+ teaser.value = FCKeditor_trim(text.slice(0,t));
+ textarea.value = FCKeditor_trim(text.slice(t+12));
+ } else {
+ teaser.value = '';
+ textarea.value = text;
+ }
+ }
} else {
window.opener.document.getElementById( FCKURLParams[ 'el' ] ).value = oEditor.GetData( true ) ; // "true" means you want it formatted.
}