Programmatically populate the Code Snippet dropdown - ISSUE

  •  05-13-2011, 11:29 AM

    Programmatically populate the Code Snippet dropdown - ISSUE

    I am using CuteEditor v6.6
     
    I have 3 editors on my page and they are called "Editor1", "Editor2", and "Editor3".
    I modified the custom code drop down to contain 3 elements ("Code1", "Code2", and "Code3").
    I want to be able to programaticly define what "Code Snippets" appear in each of my 3 editors.
    According to your documentation I am suppose to be able to do the following:
    Editor1.CodeSnippetDropDownMenuNames = "Code1, Code2, Code3"  
    Editor1.CodeSnippetDropDownMenuList = "Code1, Code2, Code3"  
     
    Editor2.CodeSnippetDropDownMenuNames = "Code1"  
    Editor2.CodeSnippetDropDownMenuList = "Code1"  
     
    Editor3.CodeSnippetDropDownMenuNames = "Code3"  
    Editor3.CodeSnippetDropDownMenuList = "Code3"  
     
    When I do this, the correct code snippets appear in the drop down for each of the editors, but when I try and select Code3 in Editor3, it does not insert the actual code, but inserts just the text "Code3".
     
    Why would it insert the name of the code snippet instead of the actual code?
     
    If I list all 3 code snippets in the drop downs for each of the 3 editors, then when I select the different code snippet from the drop down for any of the editors, the correct code is inserted. We really need to be able to custom the code snippet for each of the editors on our page. How can we do this?
     
    Sorry for all the red text, but your editor was not letting me change the text back to black. I was getting an error that the script was causing an error in my IE browser.
View Complete Thread