I have more then one Inline Editors in one page (each with its own ID foto_1a, foto_1b etc.)
<TD ALIGN="left" VALIGN="top">1a: <DIV CONTENTEDITABLE="true" ID="foto_1a">Text...</DIV></TD>
<TD ALIGN="left" VALIGN="top">1a: <DIV CONTENTEDITABLE="true" ID="foto_1b">Text...</DIV></TD>
and I use a hidden textarea form:
<FORM ID="myform" ACTION="/cgi-bin/test/test_1.pl" METHOD="post">
<INPUT TYPE="hidden" NAME="Url" ID="Url" VALUE="not defined">
<INPUT TYPE="hidden" NAME="Id" ID="Id" VALUE="not defined">
<TEXTAREA NAME="Html" ID="Html" COLS="40" ROWS="6"></TEXTAREA><BR>
</FORM>
and a plugin with a "Save" button on the toolbar:
CKEDITOR.plugins.add( 'inlinesave', {
icons: 'inlinesave',
init: function( editor ) {
editor.addCommand( 'doInlinesave', {
exec: function( editor ) {
var myid = "foto_1a";
document.getElementById('Url').value = document.URL;
document.getElementById('Id').value = [myid];
document.getElementById('Html').innerHTML = ( CKEDITOR.instances[myid].getData() );
document.forms["myform"].submit();
}
});
editor.ui.addButton( 'Inlinesave', {
label: 'Tekst opslaan',
command: 'doInlinesave',
toolbar: 'save'
});
}
});
to send the result to my server for replacing that part of the page.
How can I tel my server (myid = "foto_1a") from witch editor it comes? In other words: is there a function that tells me which editor (by ID) is in focus?
Thanks...