Inline css dissapearing

Last post 03-15-2006, 4:37 AM by jon_gyllen. 7 replies.
Sort Posts: Previous Next
  •  03-06-2006, 8:42 AM 16738

    Inline css dissapearing

    Hello
     
    I have an editor for creating emails.
    <ce:Editor id="edit" runat="server" BreakElement="Br" RemoveTBODYTag="True" 
       
    height="100%" width="800" EnableStripScriptTags="False" ShowPreviewMode="True" 
        ShowDecreaseButton="False" ShowEnlargeButton="False" DisableAutoFormatting="True"
        EnableContextMenu="False" CustomCulture="sv-SE" UseHTMLEntities="True"
       
    RemoveServerNameFromUrl="False"
       
    EditCompleteDocument="True" BaseHref="http://123.456.789.0/" UseRelativeLinks="False"
       
    AutoConfigure="Minimal" >
    </ce:Editor>
     
    I load some HTML at Page.Load and the user gets to edit the mail.
    The problem is that my inline css that I load into the editor (from a database) dissapears in html view.
    The html in the editor is not affected by the css either.
     
    If I access the .Text property my inline css i there and the mail looks good when I send it.
     
    If I change to UseRelativeLinks="True" my css shows again, but they are still not affecting the content of the editor.
    I really need UseRelativeLinks="False" or all my links and pictures in the mails gets broken
     
    What do I do wrong?
  •  03-06-2006, 10:09 AM 16744 in reply to 16738

    Re: Inline css dissapearing

  •  03-06-2006, 10:35 AM 16746 in reply to 16744

    Re: Inline css dissapearing

    From code behind. As a part of a complete html-document
  •  03-06-2006, 10:38 AM 16748 in reply to 16746

    Re: Inline css dissapearing

    Can you create a simple aspx page and post the code here?
     
     

    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, 10:59 AM 17102 in reply to 16748

    Re: Inline css dissapearing

    well - the html part of the page is already posted above.
    the codebehind is just
    editor.Text = "............."; // ... is lots of html including inline css
     
    The main problem for me is that UseRelativeLinks is affecting the content in the editor and that when I switch from normal to html all my css gets stripped away.
    As said: they are there if I access the .Text property from codebehind but I cant edit them, which I really need to do.
    Another problem I have is that BaseHref=http://123.456.789.0/ does not affect the links, it only adds a <base href=http://193.14.235.3/> to the code, not replacing inserted images urls.
     
    Something feels very wrong since I upgraded to the latest version?
  •  03-13-2006, 5:12 PM 17132 in reply to 17102

    Re: Inline css dissapearing

    I ran some more tests and after a bit of thinking I realize that userelativelinks=false and basehref is a bit contradictionary. If a basehref is set I realize that not using relative links would overwrite it with the server name.
     
    The editor then seem to just make the links relative and add the html tag base href. This is fine for web browsers but when I use it for an email the html parser strips base href away, outlook and thunderbird does that anyway. Probably a security reason.
     
    So
     
    question numer 1: Is it working this way?
    question number 2: Has it always been? I think earlier versions if cutedit just replaced the url:s?
    question numer 3: How do I solve my problem?
    question number 4: Why dont my inline css make an impact on the stylen of the contents in the editor and why does it dissapear when I switch to html edit mode?
  •  03-14-2006, 11:42 AM 17160 in reply to 17132

    Re: Inline css dissapearing

    Ok. I'll continue talking to myself here:
     
    I solved problem 1-3 prgrammatically.
     
    Problem 4 is the big issue (as the Subject of the thread says)
    I figured out that I had to set the EditorWysiwygModeCss property for the css to have an impact on the content of the editor (is this a new feature or am I really confused here?), hovever the main problem still remain: If I use UseRelativeLinks="true" everything is nice but if I use UseRelativeLinks="false" all my inline css is stripped away from the editor.
  •  03-15-2006, 4:37 AM 17210 in reply to 17160

    Re: Inline css dissapearing

    Can I get a confirmation if this is workong as intended or if I am doing something wrong please?
View as RSS news feed in XML