html support

Last post 02-28-2014, 10:54 AM by bartje. 4 replies.
Sort Posts: Previous Next
  •  02-27-2014, 6:31 AM 79984

    html support

    Hi Guys,

     

    I have the cute-editor implemented in my application,

    the cute-editor is set to xhtml, a line-break will be like this "<br />"

    but I want this to set to html so a line-break will look like this "<br>"

    how can I do this, I am trying to find and example where this is done but I can't find any.

     

    regards

     

    Bart

     

  •  02-27-2014, 7:51 AM 79985 in reply to 79984

    Re: html support

    Hi bartje,

     

    Please add the code below into the bottom of your page, it will switch the <br /> to <br>.

     

    1. <script type="text/javascript">        
    2. function CuteEditor_FilterHTML(editor,code)     
    3. {     
    4.     return code.split("<br />").join("<br>");  
    5. }     
    6. function CuteEditor_FilterCode(editor,code)     
    7. {     
    8.      return code.split("<br />").join("<br>");  
    9. }     
    10. </script>  
     

    Regards,

     

    Ken 

  •  02-28-2014, 5:45 AM 79992 in reply to 79985

    Re: html support

     Hi Kenneth,

     

    thank you for your answer,

    isn't there another way to accomplish this?

     

    according to this example http://cutesoft.net/example/xmloutput.aspx

    cuteeditor can create W3C valid html or xhtml code.

     

    And I need the editor to do this.

    however all examples I saw are only generating xhtml, and when I use an "&" is isn't rewritten to "&amp;"  is it should be for xhtml.

     

    Regards Bart

     

  •  02-28-2014, 8:11 AM 79996 in reply to 79992

    Re: html support

    Hi bartje,

     

    For the br question, it is the only way for now.

     

    For the & question, please set property "UseSimpleAmpersand" to true, then editor will not cover the symbol.

     

     <CE:Editor ID="editor1" runat="server" UseSimpleAmpersand="true">

            </CE:Editor> 

     

    Regards,

     

    Ken 

  •  02-28-2014, 10:54 AM 80001 in reply to 79996

    Re: html support

     thnx,

     

    this works like a charm, In my application users can chose there own doctype so I made this doctype dependent.

    If I find any other this which isn't compatible and I can't figure out myself I  will ask you again ;)

View as RSS news feed in XML