Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center
in Search

Strips out Dreamweaver code!

Last post 10-06-2005, 9:18 AM by joenineo. 7 replies.
Sort Posts: Previous Next
  •  10-03-2005, 4:55 AM 11293

    Strips out Dreamweaver code!

    HI
     
    I have built a site using dreamweaver nad use CuteEditor .NET v5.  The Cute Editor is changing my dreamweaver code e.g.
     
    Original Code =

    <a href="index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','/buttons/home-over.jpg',1)"><img src="/buttons/home-off.jpg" name="home" width="73" height="14" border="0"></a>
     
    Canged Code =
     
    <a onmouseover="MM_swapImage('home','','/buttons/home-over.jpg',1)" onmouseout=MM_swapImgRestore() href="index.htm"><img height=14 src="/buttons/home-off.jpg" width=73 border=0 name=home></a>

    I have EnableStripScriptTags="false" as I also have a external script that applies transparncey for png files.

    Is there a way so that I can stop the editor changing code in a certain area, eg like a template.

    This is quite urgent as the client has started to change copy.

    Cheers

    Joe
     
     
  •  10-03-2005, 12:48 PM 11301 in reply to 11293

    Re: Strips out Dreamweaver code!

    Joe,

    Try set DisableAutoFormatting to "true".

    Keep me posted.

     

    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

  •  10-04-2005, 2:25 AM 11353 in reply to 11301

    Re: Strips out Dreamweaver code!

    Hi Adam
     
    I already have DisableAutoFormatting="true".  Below is my editor
     
    <CE:Editor id="Editor1" width="820" height="700" DisableAutoFormatting="true" ToggleBorder="false" FullPage="true" UseRelativeLinks="true" RemoveServerNamesFromUrl="true" EnableStripScriptTags="false" EditorWysiwygModeCss="../../css/snow-surfing.css" EditCompleteDocument="true" AllowPasteHtml="false" ThemeType="Office2003_BlueTheme" runat="server" ></CE:Editor><BR>
     
    Any ideas becuase this is not good as most of my websites will be built dreamweaver.
  •  10-04-2005, 2:55 PM 11375 in reply to 11353

    Re: Strips out Dreamweaver code!


    ARE YOU USING CODE BEHIND TO POPULATE THE CUTE EDITOR ? IN THIS CASE, DisableAutoFormatting="true" DOES NOT WORK with version 4.5  .. I LEARNT HARD WAY AFTER SPENDING MANY MANY HOURS IN FUTILE ..
     
    I HAD TO DO A WORK AROUND..

    I HAVE ALREADY REPORTED THIS BUG TO ADAM, AND HE BELIEVES ITS FIXED IN VER 5.0

    GOOD LUCK !! 
  •  10-04-2005, 4:22 PM 11380 in reply to 11375

    Re: Strips out Dreamweaver code!

    joenineo,
     
    Let us do a test here.
     
    http://cutesoft.net/example/editregions.htm
     
    step 1. Post your code into the TextArea, then click the button "Append to HTMLEditor".

    step 2. The button "Append to TexEditor".

    You will find the code will be:

    <a href="index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','/buttons/home-over.jpg',1)"><img src="/buttons/home-off.jpg" name="home" width="73" height="14" border="0"></a><IMG height=14 src="/buttons/home-off.jpg" width=73 border=0 name=home></A>

    <A onmouseover="MM_swapImage('home','','/buttons/home-over.jpg',1)" onmouseout=MM_swapImgRestore() href="/example/index.htm"><IMG height=14 src="/buttons/home-off.jpg" width=73 border=0 name=home></A>

    What I am trying to explain is:

    This is an IE behaviour.

    If you have onmousever, onmouseout event in the link tag, the IE will automatically put them behind the href attribute.

    Hope it helps.

    Let me know if you have any further questions.





     
     

    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

  •  10-06-2005, 4:25 AM 11471 in reply to 11380

    Re: Strips out Dreamweaver code!

    Hi Adam
     
    The problem is that CuteEditor is removing " from around one of the functions.  Example below
     
    Original = onMouseOut="MM_swapImgRestore()"
     
    After  = onmouseout=MM_swapImgRestore()
     
    This is the only problem everything else is fine.
     
    Any ideas why CuteEditor does this?
  •  10-06-2005, 4:50 AM 11472 in reply to 11380

    Re: Strips out Dreamweaver code!

    Hi Adam
     
    Sorry I have just found out something else that is happening.  cuteeditor is removing the line below
     
    <body bgcolor="#ffffff" onLoad="MM_preloadImages('/home2/go.png','/buttons/contract-over.jpg','/buttons/media-over.jpg','/buttons/snowsurfing-over.jpg','/buttons/team-over.jpg','/buttons/products-over.jpg','/buttons/home-over.jpg','/home2/go.gif','/home2/gol.gif')">
     
    Which preloads the rollovers!!!!
     
    Why??
  •  10-06-2005, 9:18 AM 11480 in reply to 11380

    Re: Strips out Dreamweaver code!

    Hi Adam
     
    I have produced a simple example that shows a whole page before and after, the after pae the rollovers will change the image but when you move off the image it does not swap back.
     
    ORIGINAL PAGE
     
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=aIdea [I])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (aIdea [I].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=aIdea [I];}}
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=dNo [N])&&d.all) x=d.allNo [N]; for (i=0;!x&&i<d.forms.length;i++) x=d.formsIdea [I]No [N];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layersIdea [I].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(aIdea [I]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>
    <body>
    <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button','','/buttons/contract-on.jpg',0)"><img src="/buttons/contract-off.jpg" name="button" width="97" height="16" border="0"></a></body>
    </html>
     
    CUTEEDITOR PAGE
     
    <html><head><title>Untitled Document</title>
    <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
    <script language=JavaScript type=text/JavaScript>
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=aIdea [I])&&x.osrc;i++) x.src=x.oSrc;
    }
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (aIdea [I].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=aIdea [I];}}
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=dNo [N])&&d.all) x=d.allNo [N]; for (i=0;!x&&i<d.forms.length;i++) x=d.formsIdea [I]No [N];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layersIdea [I].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(aIdea [I]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    <link href="/editor5/snow-surfing.css" rel=stylesheet></head>
    <body><a onmouseover="MM_swapImage('button','','/buttons/contract-on.jpg',0)" onmouseout=MM_swapImgRestore() href="#"><img height=16 src="/buttons/contract-off.jpg" width=97 border=0 name=button></a> </body></html>
     
    Please see if you can work it out adam as this function is all our web sites.
     
    Cheers
     
    Joe
View as RSS news feed in XML
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.