multiple editors: find out which one is active/focused

  •  09-01-2009, 3:30 AM

    multiple editors: find out which one is active/focused

    Hi there,
     
    how can I find out which editor on the page is active / has the focus and how can I put it into an event?
     
    So if you have multiple editors on one page, I need something like
     
    alert("editor 1 active") when editor1 is focused.
     
    Background:
     
    I seperated the toolbar from the editor and put it to the top of the page, which works fine. On multiple editors, the toolbar from editor2 is positioned over the toolbar from editor1 by css. So it looks as there is onlay one toolbar, which is the effekt I am trying to achieve.
     
    All what I am missing is to bring the active toolbar to the front dependent on in which editor the user is typing. Maybe this can be done via the API.
     
    At the moment I am trying this, which kinda works :):
     
    document.getElementById('CE_Editor1_ID').onmouseover = new Function("alert(this.id)");
    document.getElementById('CE_Editor2_ID').onmouseover = new Function("alert(this.id)");
     
    best regards
     
    Bernd
    Filed under:
View Complete Thread