CuteEditorFrame Element style tag defaults being overwritten with Fixed height in PX

  •  01-02-2012, 12:10 AM

    CuteEditorFrame Element style tag defaults being overwritten with Fixed height in PX

    Hello,
     
    I was exploring a resizing issue with the newest editor (everything else works fantastic as far as I have tested), and I have come accross the following issue which is repeatable:
     
    1. When using the editor in FullScreen, the edit box (the iframe with the class name "CuteEditorFrame") which also has a style tag appended to it on build (see line #619 of include_CuteEditor.php) sets the defaults for that tag to "Height: 100%; Width: 100%", however after the page has drawn, the element's height is altered to a fixed height in px inside the style=  section of the element with class "CuteEditorFrame" (which is the iframe edit box in between the toolbar, and footer bar).
     
    I have tried attaching the following code to alter this back on page load complete as a sort of hack to work around this issue, however it seems to be something inside the loader.js (which is obfuscated), that is overriding this. I can not confirm at this time, however that is where my troubleshooting ended and I am writing this post.
     
    1. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>  
    2. <script type="text/javascript" charset="utf-8">  
    3.     $().ready(function() {  
    4.         $('.CuteEditorFrame').css('height','100%');  
    5.     });  
    6. </script> 
     The entire block of code I am using is as follows:
     
    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    2. <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">  
    3.     <head>  
    4.        <title>TEST</title>  
    5.        <style type="text/css">  
    6.             html, body {  
    7.             height: 100%;  
    8.             margin: 0; padding: 0;  
    9.         }  
    10.     </style>  
    11. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>  
    12. <script type="text/javascript" charset="utf-8">  
    13.     $().ready(function() {  
    14.         $('.CuteEditorFrame').css('height','100%');  
    15.     });  
    16. </script>  
    17.     </head>  
    18.     <body bgcolor="#979080" marginheight="0" marginwidth="0">  
    19. <?php  
    20.     include_once("php/ce/include_CuteEditor.php");  
    21.     $fname = "../" . $_GET['file'];  
    22.     $form_unique_id = md5($fname);  
    23.     echo '<body bgcolor="#ffffff"><FORM name="' . $form_unique_id . '" method="post" action="editframe.php?file=' . urlencode($_GET['file']) . '&postback=true">';  
    24.     $editor=new CuteEditor();  
    25.     $editor->ID="code";  
    26.     $editor->EditorWysiwygModeCss="/style.css";  
    27.     $editor->EditCompleteDocument=false;  
    28.     $editor->FullPage=true;  
    29.     $editor->BaseHref='http://' . $_SERVER['SERVER_NAME'];  
    30.     $editor->ThemeType="Office2003";  
    31.     $editor->URLType="SiteRelative";  
    32.   
    33.     if(!is_dir($_SERVER['DOCUMENT_ROOT'] . "images/")) { mkdir($_SERVER['DOCUMENT_ROOT'] . "images/"); }  
    34.     $editor->ImageGalleryPath="/images/";  
    35.       
    36.     if(!is_dir($_SERVER['DOCUMENT_ROOT'] . "uploads/")) { mkdir($_SERVER['DOCUMENT_ROOT'] . "uploads/"); }  
    37.     $editor->FlashGalleryPath="/uploads/";  
    38.     $editor->MediaGalleryPath="/uploads/";  
    39.     $editor->FilesGalleryPath="/uploads/";  
    40.       
    41.     if (@$_GET["postback"]!="true")  
    42.       {  
    43.           if($fname != "../") {  
    44.               $editor->LoadHTML($fname);  
    45.           }  
    46.           $editor->Draw();  
    47.       }  
    48.     else  
    49.     {  
    50.           $editor->SaveFile($fname);  
    51.           $editor->Draw();  
    52.     }  
    53.     $editor=null;  
    54.     echo '</FORM></body>';  
    55. ?>  
    56.     </body>  
    57. </html> 

    Custom Software Developent at MicroVB INC
View Complete Thread