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

  •  03-03-2006, 11:48 AM

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

    Hi Adam, thanks for the reply! 
    However, I'm not getting anything added to the editor when I click my hyperlink - it stays blank! The code I have for the page with CuteEditor on it is:
     
     
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!--#include file="CuteEditor_Files/include_CuteEditor.asp" -->
    <head>
    <title>Test</title>
    </head>
    <script>
    function addtoeditor(comment) {
    document.form1.Reports.Value = document.form1.Reports.Value + comment;
    }
    </script>
    <body>
    <form action="" method="get" name="form1">
    <%       
           Dim editor
           Set editor = New CuteEditor  'Create a new editor class object         
             
           'Set the ID of this editor class
           editor.ID = "Reports"
             
           'Set the initial HTML value of editor control
           editor.Text = ""
           editor.FilesPath = "CuteEditor_Files"
           'editor.DisableItemList = "CSSClass, FormatBlock, FontName, FontSize"
                  
           editor.Template= "Bold,Italic,Underline"
           
           'editor.Width = 740
           'editor.Height = 100
           
           editor.ThemeType="Office2003"
           'editor.EditorWysiwygModeCss = "asp.css"
           editor.RemoveServerNamesFromUrl = true
           
           editor.Draw()
           
           ' Retrieve the data from editor: Request.Form("Editor1")
           %>
    <a href="#" onclick="addtoeditor('This has been added. ');">Click here to add something to the textarea</a>
    </form>
    </body>
    </html>
     
     
    Thanks,
    Steve.
View Complete Thread