Search code examples
fckeditor

FCKEDITOR table insertion problem from doc


When i copy paste table from word file, it doesn't allow me to add text outside the table. I follow this procedure 1)copy paste the table from Microsoft word file using "paste word" option in fckeditor. But after that, if i want to type some text outside the table , fckeditor doesn't allow me to do so.

the cursor doesn't go outside of table

thanks for any help, solutions in advance


Solution

  • somehow managed to fix this bug. patchwork :P

    \editor\dialog\fck_paste.html line no 100 inside function Ok(){}

    added some lines at two places

    1)

    else 
        sHtml = oBody.innerHTML ;
    // 25oct2010 added to fix After pasting a table from word it is not possible to navigate outside the table
        if ( oEditor.FCKBrowserInfo.IsIE )
            sHtml+="";
        else
            sHtml+="< br / >";
        //end  25oct2010 added to fix After pasting a table from word it is not possible to navigate outside the table 
            // Fix relative anchor URLs (IE automatically adds the current page URL).
            var re = new RegExp( window.location + "#", "g" ) ;
    

    2)

    range.MoveToBookmark( bookmark ) ;
            range.Collapse( false ) ;
            range.Select() ;
            range.Release() ;
            return true ;
        }
        // 25oct2010 added to fix After pasting a table from word it is not possible to navigate outside the table
        if ( oEditor.FCKBrowserInfo.IsIE )
            sHtml+="";
        else
            sHtml+="< br / >";
        //end  25oct2010 added to fix After pasting a table from word it is not possible to navigate outside the table
        oEditor.FCK.InsertHtml( sHtml ) ;
    

    Note: make the br tag proper at these lines sHtml+="< br / >";