Re: Find & Replace feature

  •  05-16-2011, 2:44 AM

    Re: Find & Replace feature

    1. Hi Ken,

    2. May I know what is code here? is it referring to editor.text (which is the underlying HTML)?

    1. Next, I would like to clarify my question here, I would like to be able to do search & replace like the one found in the cute editor toolbar, the search & replace should work from the normal text while the underlying HTML remains.

    1. Please advice.

    2. <script type="text/javascript">      
    3. function CuteEditor_FilterHTML(editor,code)   
    4. {   
    5.     return code.replace(/(<form[^\>]*\>)([\s\S]*)(\<\/form\>)/i, "$2");   
    6. }   
    7. function CuteEditor_FilterCode(editor,code)   
    8. {   
    9.     return code.replace(/(<form[^\>]*\>)([\s\S]*)(\<\/form\>)/i, "$2");   
    10. }   
    11. </script>

    12. Regards,

    13. Yuen Li

View Complete Thread