Re: Can't update H1 tags in config files

  •  08-06-2010, 4:57 AM

    Re: Can't update H1 tags in config files

    Hi, That worked great for a single heading, I really need to do this for all headings except h1s, so I changed it to this:
     
    <script type="text/javascript">     
                   function CuteEditor_FilterHTML(editor,code)  
                   {  
                       return code.split("<h3>").join("<h3 style='padding:0;margin:0'>");
                   }  
                   function CuteEditor_FilterCode(editor,code)  
                   {  
                      return code.split("<h3>").join("<h3 style='padding:0;margin:0'>");
                   }  
                   function CuteEditor_FilterHTML(editor,code)  
                   {  
                      return code.split("<h2>").join("<h2 style='padding:0;margin:0'>");
                   }  
                   function CuteEditor_FilterCode(editor,code)  
                   {  
                      return code.split("<h2>").join("<h2 style='padding:0;margin:0'>");
            } 
                   function CuteEditor_FilterHTML(editor,code)  
                   {  
                      return code.split("<h4>").join("<h4 style='padding:0;margin:0'>");
                   }  
                   function CuteEditor_FilterCode(editor,code)  
                   {  
                      return code.split("<h4>").join("<h4 style='padding:0;margin:0'>");
                   }
                   function CuteEditor_FilterHTML(editor,code)  
                   {  
                       return code.split("<h5>").join("<h5 style='padding:0;margin:0'>");
                   }  
                   function CuteEditor_FilterCode(editor,code)  
                   {  
                       return code.split("<h5>").join("<h5 style='padding:0;margin:0'>");
                   }  
           </script>
     
    Unfortunatly this only picks up the first heading tag in the list and ignore the others, I also tried doing multiple headings in the same function which was never going to work since you can only return once for each function :)
     
    How would I write this to allow me to do multiple headings?
View Complete Thread