Having Trouble with EditorWysiwygModeCss

Last post 07-25-2011, 2:19 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  07-24-2011, 8:32 PM 68814

    Having Trouble with EditorWysiwygModeCss

    In my php I have:
     
       $editor->EditorWysiwygModeCss = content.css;
     
    in "my_editor.php".
     
    I have several problems/areas of confusion.
     
    (1) What is the assumed directory that content.css needs to be in?
     
    In my case, I have the following folder structure:
     
    public_html
         /cuteeditor files
        /config
              my_editor.php
     
    Where is $editor->EditorWysiwygModeCss's base directory?
     
    (2) The foregoing notwithstanding, I stuck the content.css file in every conceivable location, and got no effect.
     
    For reasons I won't go into, my CSS selectors have to be pretty specific, so a typical statement in the above CSS file might be:
     
        #cute_editor h1 {font-size:16px; color:red}
     
    I am depending upon, here, the observed fact that the generated HTML from the Cute Editor has the entire editing window below a <div id="cute_editor"> tag.  However, I note that the entire editor is rendering inside of an  <iframe>, and when I point at the h1 element in FireBug, it reports that the only h1 style in effect is "element.style". My content.css files is either not being seen, or my selector(s) are not working with the way Cute Editor generates HTML.
     
    Advice?
     

    Steve Johnson
    U.S.Coast Guard Auxiliary
  •  07-25-2011, 2:19 AM 68828 in reply to 68814

    Re: Having Trouble with EditorWysiwygModeCss

    Hi HighConcept,
     
    There is not a base directory.
     
    For example,
     
    1. I have the page below at the root of my test site.
     
    <?php include_once("cuteeditor_files/include_CuteEditor.php") ; ?>
    <html>    
        <head>
            <title>Edit Static Html Example -- PHP Content Management, PHP WYSIWYG, PHP HTML Editor, PHP Text Editor</title>
            </head>
        <body>
        <form name="theForm" action="Edithtml.php?postback=true" method="post">
              <?php
                    $editor=new CuteEditor();
                    $editor->ID="Editor1";
                    $editor->EditorWysiwygModeCss="ken.css";
                    $editor->Draw();
                    $editor=null;
               ?>
            </form>
        </body>
    </html>
     
    2. I have the css file below at the root of my test site name "ken.css"
     
     
    .redText
    {
       color:Red;
    }
     
    3.Than I add the content below in to editor html view, it show the red style for me in the editor.
     
    <div class="redText">this is a test</div> 
     
     
    Please follow the steps above to test it.
     
    Regards,
     
    Ken
View as RSS news feed in XML