SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Kennett Square, PA USA
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ckeditor - get instance value

    I have a cms page that uses multiple instances of ckeditor. In the previous version of this cms we used FCKeditor.

    The problem is that we cannot get the value of the specific ckeditor instances.

    The ckeditor documentation says that I can get the value of an instance like this:
    CKEDITOR.instances.editor1.getData()

    This assumes that my ckeditor instance is associated with a form field called "editor1".

    My question is, how do I modify the code so that "editor1" is a variable?

    I have the value of the variable in a js var called editorName

    Thanks,
    Jack

  2. #2
    SitePoint Zealot
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    CKEDITOR.instances[editorName].getData()

  3. #3
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Kennett Square, PA USA
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man. That worked. I appreciate it

    Jack Albright


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •