Rendering CSS in design & preview mode

Last post 11-09-2006, 4:52 AM by textyou. 2 replies.
Sort Posts: Previous Next
  •  10-18-2006, 6:57 AM 23665

    Rendering CSS in design & preview mode

    Hi,
     
    Sorry for the multiple posts... the editor is very good, but I have noticed that when I copy code into the HTML pane that has CSS in it, inside a <style> tag, it won't render in the design/normal mode or the preview mode.
     
    Is there a way to get it to render and appear as it will on the page? When I save the page and write the output to an HTML file, it all appears correctly.
     
    The css is in the format:
    <style type="text/css">
    <!--
    .normaltext {
     font-family: Verdana;
     font-size: 10px;
     color: #E4B6FF;
     font-weight: normal;
    }
    -->
    </style>
     
    Many Thanks,
     
    Chris
  •  11-03-2006, 1:26 PM 24000 in reply to 23665

    Re: Rendering CSS in design & preview mode

    Hi Chris,
     
    I was able to get this to work!  The steps i went thru were:
    1.  Where you call your editor.draw(), put this before it:   editor.EditorWysiwygModeCss = "css/site.css"  where "css" is the name of the folder, and site.css is the stylesheet that holds your styles. 
    2.  In my site.css, i made a style called .title { font-weight: bold; color: #FF0000; }
    3.  In CuteEditor_Files/Configuration/Shared, i edited common.config to show my new style.  I found the dropdown for the css styles: <CssClass> and added the item <item text="Title" value="title"></item> in it.
     
    and it worked like a charm.
  •  11-09-2006, 4:52 AM 24186 in reply to 24000

    Re: Rendering CSS in design & preview mode

    Hi,
     
    Does this work for style elements not contained on a style sheet? The reason is...
     
    I have added an option to "Grab page from URL", where a designer can post their own content on the web, with all the style elements inside <style> tags in the header of the page (to keep it all together and so external style sheets don't get lost/deleted in the future). The user will then put the URL in a form box, click "get" and the page loads the content from that page into the editor for saving.
     
    This works fine with firefox, but when I tried it in IE, it removes the content in the <style> tags...
     
    Chris
View as RSS news feed in XML