Link CSS file to the templates preview

Last post 03-17-2006, 12:03 AM by rcroeder. 7 replies.
Sort Posts: Previous Next
  •  03-10-2006, 12:52 AM 16931

    Link CSS file to the templates preview

    With version 5.1, is it possible to link a CSS file to the templates preview.
    I wish to provide multiple design layouts (sections of an HTML page) in the templates but it would be useful if the preview would show the real design at it will appear on the final HTML page.
    Thanks
  •  03-12-2006, 11:35 PM 17080 in reply to 16931

    Re: Link CSS file to the templates preview

    Editor.EditorWysiwygModeCss Property

    Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported. Example EditorWysiwygModeCss="example.css,/default.css"

     


    Example Code

          <%
               Dim editor
               Set editor = New CuteEditor
               editor.ID = "Editor1"
               'Specifies the location of the style sheet that will be used by the editable area.
               editor.EditorWysiwygModeCss = "example.css,/default.css"
               editor.Text = "Hello World"
               editor.Draw()
          %>
     
    The above style sheets are used in the preview window as well.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-13-2006, 12:54 PM 17108 in reply to 17080

    Re: Link CSS file to the templates preview

     Adam, thanks for your reply. Unfortunately it doesn't solve the problem. Maybe I didn't explain it well.

    The editor is working correctly and includes the CSS as it is suppose to do.
    The problem is with the Insert Template module. When previewing a template, the CSS file is not linked to the right panel, so if I have 10 templates with a background color difference, the user cannot see it while selecting the template.
     
    Below is a template as it appears correctly in the editor and the same template in the Templates selection tool, notice the nmissing box, fonts and background color.
     
     
  •  03-13-2006, 1:26 PM 17118 in reply to 17108

    Re: Link CSS file to the templates preview

    oh now that is fun...have you tried to do an include of the style sheet into the template itself? This may be the only way for this to work. I do not believe that this editor has the capability to do what you want, but by placing the style sheet inside you could accomplish it. I have not tried it but it should work.
     
    RC
  •  03-13-2006, 4:46 PM 17130 in reply to 17118

    Re: Link CSS file to the templates preview

    I do not want to include the css in the templates otherwise I'll have on the same final HTML page 10 calls to the same CSS
  •  03-15-2006, 3:38 AM 17208 in reply to 17108

    Re: Link CSS file to the templates preview

      I am somewhat confused, you have a list of templates, but the template does not render correctly inside of the insert template viewer. Just to clarify, what I think you want, is the template is to be rendered by the CSS that is currently assigned in the editor. If that is the case, then you just want the value set by EditorWysiwygModeCss to be extended into the templates.
     
    RC
  •  03-16-2006, 10:21 PM 17288 in reply to 17208

    Re: Link CSS file to the templates preview

    Correct
  •  03-17-2006, 12:03 AM 17289 in reply to 17288

    Re: Link CSS file to the templates preview

    well the way in which they are loading the preview file, there is no "hook" to pass in that variable in from looking at the code. That particular code is done with iframes, they (cutesoft) would have to push the css variable into a session and the template file would have to be able to read that session variable. It could work, but that is more like a wishlist thingy
     
     
    RC
View as RSS news feed in XML