how to make this editor default status active please ??

Discussion in 'JavaScript' started by crazy.works, Dec 17, 2009.

  1. #1
    Hello, i wanna use NiceEdit text editor in my site.
    but when i load the editor page, always i find the editor non-active, i have to click inside the textarea to active the textarea and the editor. have a look at the demo here http://nicedit.com/demos.php
    so i want to set the editor default status active without clicking inside the textarea to active it, so how can i do that please ??
    thanks
     
    crazy.works, Dec 17, 2009 IP
  2. SIPHILP

    SIPHILP Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could fake a click event when the page has finished loading:

    jQuery

    
    
    $('#id').click();
    
    
    
    Code (markup):
     
    SIPHILP, Dec 18, 2009 IP
  3. crazy.works

    crazy.works Peon

    Messages:
    304
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    any other idea please ??
     
    crazy.works, Dec 18, 2009 IP
  4. SIPHILP

    SIPHILP Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I don't see how faking a click on the element via using a framework like jQuery or usual javascript would cause a problem? Would seem someone else has the same issue:

    nicedit.com/forums/viewtopic.php?f=5&t=496&p=1132&hilit=enabled#p1132

    Maybe worth keeping an eye
     
    Last edited: Dec 19, 2009
    SIPHILP, Dec 19, 2009 IP