Add to text in CuteEditor by clicking on a hyperlink outside the editor

  •  03-03-2006, 7:44 AM

    Add to text in CuteEditor by clicking on a hyperlink outside the editor

    Hello all,
    I'm trying to update the contents of the CuteEditor with some text when I click a hyperlink (I'm not quite sure this is the best way to do this, as I'm just trying stuff out at the moment). With a normal text area, I can achieve what I want with:
     
    <script>
    function addtoeditor(comment) {
    document.form1.Reports.value = document.form1.Reports.value + comment;
    }
    </script>
    <form action="" method="get" name="form1">
    <textarea name="Reports" cols="50" rows="20"></textarea>
    <a href="#" onclick="addtoeditor('This has been added. ');">Click here to add something to the textarea</a>
    </form>
     
    How do I achieve this with a CuteEditor textarea (which is called editor.ID = "Report")?
     
    Many thanks,
    Steve.
View Complete Thread